rb_subbuf_start(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ rb_subbuf_start β€” the kernel API manual, bestie edition πŸŽ€

okay so this one's from the Kernel API Manual and honestly? it's a little baby function with a big job. it lives in rb_subbuf_start(9) land and it's giving "just tell me where the subbuffer starts" energy. no cap, that's literally the whole vibe. πŸ’…


🌸 NAME 🌸

rb_subbuf_start β€” get the start address of a subbuffer

like, you hand it an address and it hands you back the beginning of the subbuffer that address lives in. iconic behavior honestly πŸ¦‹


✨ SYNOPSIS ✨

unsigned long rb_subbuf_start (struct trace_buffer *buffer , unsigned long addr );

that's it. that's the whole call. two arguments, one unsigned long coming back atcha. slay πŸ’–


πŸŽ€ ARGUMENTS πŸŽ€

  • buffer β€” a trace buffer. yes bestie, the struct trace_buffer * one. that's where all the action is happening.
  • addr β€” an address of an event on a subbuffer. like, some event is chilling somewhere on a subbuffer and you're pointing at it going "where does this bit start tho?"

🫢 RETURN 🫢

it returns the start of the subbuffer for where addr sits. so you give it a spot inside a subbuffer and it gives you back the top of that subbuffer. no drama, no surprises, just vibes and an unsigned long. πŸ’œ


🌈 SEE ALSO 🌈

okay this is the part where the manpage goes absolutely feral with references, so buckle up. all of these are from the kernel file ./kernel/trace/ring_buffer.c and honestly the ring buffer family is a whole friend group:

ring_buffer_event_length(9), ring_buffer_event_data(9), rb_page_capacity(9), rb_subbuf_capacity(9), rb_subbuf_max_data_size(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_get(9), ring_buffer_subbuf_order_set(9)

yeah. that's sixty-something siblings. main character energy runs in the family πŸ‘‘


lowkey a reminder: this page is filed under ./kernel/trace in the Kernel API Manual, dated October 2026. go read the source if you want the deep lore 🧚

and that's the whole page bestie πŸ’– now go find your subbuffer start. periodt. ⭐

πŸ“¦ where this page comes from