ring_buffer_...uf_order_get(9)
π
ring_buffer_...uf_order_get(9) β bestie edition β¨
okay so real talk, this page lives in the Kernel API Manual, section 9, and it's about one very specific little question: what order is your sub page, babe? π stay with me, it's gonna slay.
β¨ NAME β¨
ring_buffer_subbuf_order_get β get the order of system sub pages in one buffer page. literally just a lil getter, no cap π«Ά
πΈ SYNOPSIS πΈ
int ring_buffer_subbuf_order_get (struct trace_buffer *buffer );
one function, one argument, one int coming back at you. iconic behaviour honestly. π
π¦ ARGUMENTS π¦
bufferβ the ring_buffer you wanna get the system sub page order from. that's it, that's the whole vibe. pass it in, get your answer. β¨
π DESCRIPTION π
so here's the lore π β by default, one ring buffer sub page equals one system page. that's the starting point, the default fit, the no-thoughts-just-vibes config.
but bestie, it's configurable β per ring buffer, okay? per. ring. buffer. so you can absolutely go off and make the ring buffer sub page size bigger if you want. the one rule: it must be an order of system page size. no chaos allowed, only powers of two energy. π
and what does this function actually give you back? it returns the order of the buffer sub page size, in system pages β so like:
0means the sub buffer size is 1 system page- and so forth. you get it. the math is mathing. π₯
and if something goes wrong? in case of an error, a value < 0 is returned. so if you see a negative number, that's not a vibe, that's a problem, go check yourself before you wreck yourself. π
π SEE ALSO π
the kernel file this lives in: ./kernel/trace/ring_buffer.c β go read it, it's giving main character energy π
and the whole ring buffer friend group π«Ά (they all showed up to the group chat):
ring_buffer_event_length(9)ring_buffer_event_data(9)rb_page_capacity(9)rb_subbuf_capacity(9)rb_subbuf_max_data_size(9)rb_subbuf_start(9)ring_buffer_event_time_stamp(9)ring_buffer_nr_dirty_pages(9)ring_buffer_wake_waiters(9)ring_buffer_wait(9)ring_buffer_poll_wait(9)rb_check_pages(9)rb_validate_buffer(9)__ring_buffer_alloc(9)__ring_buffer_alloc_range(9)__ring_buffer_alloc_remote(9)ring_buffer_free(9)ring_buffer_resize(9)rb_update_event(9)ring_buffer_nest_start(9)ring_buffer_nest_end(9)ring_buffer_unlock_commit(9)ring_buffer_lock_reserve(9)ring_buffer_discard_commit(9)ring_buffer_write(9)ring_buffer_record_disable(9)ring_buffer_record_enable(9)ring_buffer_record_off(9)ring_buffer_record_on(9)ring_buffer_record_is_on(9)ring_buffer_record_is_set_on(9)ring_buffer_record_is_on_cpu(9)ring_buffer_record_disable_cpu(9)ring_buffer_record_enable_cpu(9)ring_buffer_oldest_event_ts(9)ring_buffer_bytes_cpu(9)ring_buffer_entries_cpu(9)ring_buffer_overrun_cpu(9)ring_buffer_commit_overrun_cpu(9)ring_buffer_dropped_events_cpu(9)ring_buffer_read_events_cpu(9)ring_buffer_entries(9)ring_buffer_overruns(9)ring_buffer_iter_reset(9)ring_buffer_iter_empty(9)ring_buffer_peek(9)ring_buffer_iter_peek(9)ring_buffer_consume(9)ring_buffer_read_start(9)ring_buffer_read_finish(9)ring_buffer_iter_advance(9)ring_buffer_size(9)ring_buffer_max_event_size(9)ring_buffer_reset_cpu(9)ring_buffer_reset_online_cpus(9)ring_buffer_reset(9)ring_buffer_empty(9)ring_buffer_empty_cpu(9)ring_buffer_swap_cpu(9)ring_buffer_alloc_read_page(9)ring_buffer_free_read_page(9)ring_buffer_read_page(9)ring_buffer_read_page_data(9)ring_buffer_read_page_size(9)ring_buffer_subbuf_size_get(9)ring_buffer_subbuf_order_set(9)β the setter to this getter, the other half of the ship, iykyk π
that's the whole page bestie, go forth and get that order π mwah π
and yes, the credits ily: this one's from./kernel/trace, dated October 2026, and the footer still calls itring_buffer_...uf_order_get(9)because the header line got truncated and we're all just living with it π periodt.
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms