ring_buffer_resize(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« ring_buffer_resize(9) πŸ’«

okay bestie, so this is a page from the Kernel API Manual and it's about ring_buffer_resize β€” yes, exactly what it sounds like, we're changing the size of the ring buffer πŸŽ€ lowkey a glow-up for your trace buffer, ngl.


✨ NAME ✨

ring_buffer_resize β€” resize the ring buffer πŸ’…


🌸 SYNOPSIS 🌸

int ring_buffer_resize (struct trace_buffer *buffer , unsigned long size
, int cpu_id );

ok so it's giving int, it takes three things, and you're gonna wanna read the next section fr fr 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • buffer β€” the buffer to resize. that's the main character right there πŸ‘‘
  • size β€” the new size. the new lewk ✨
  • cpu_id β€” the cpu buffer to resize. yes, per-cpu, we love a specific queen πŸ’œ

🌈 DESCRIPTION 🌈

kay so the minimum size? it's 2 * rb_subbuf_capacity(buffer). that's the floor, bestie, don't go below it πŸ™ˆ

and the returns: 0 on success, and < 0 on failure. literal success vs. the flop era 😭

ngl, that's the whole description β€” short and iconic. periodt πŸ’…

⭐ SEE ALSO ⭐

the kernel file is ./kernel/trace/ring_buffer.c β€” that's where the magic lives 🧚 and here's the whole friend group, no one left out, fr fr:


and that's the whole vibe check πŸ’– this page lives in ./kernel/trace, dated October 2026, and it's still ring_buffer_resize(9) at the end of the day β€” slay, go resize something responsibly, bestie πŸŒΈπŸ’…πŸ«Ά

πŸ“¦ where this page comes from