ring_buffer_..._disable_cpu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ring_buffer_..._disable_cpu(9) β€” like, the Kernel API Manual, bestie ✨

okay so before we even start: yes, the page title is literally ring_buffer_..._disable_cpu(9) (the ... is doing a lot of heavy lifting, iykyk), and it lives in the Kernel API Manual. she's a kernel function, she's fancy, she's about to tell one specific CPU to shut up and stop writing. let's get into it πŸŽ€


🌸 NAME 🌸

ring_buffer_record_disable_cpu β€” stop all writes into the cpu_buffer πŸ’…

like, all of them. not a vibe check, an actual stop.


✨ SYNOPSIS ✨

void ring_buffer_record_disable_cpu (struct trace_buffer *buffer , int
cpu );

that's it. that's the whole signature. void return, so she gives you nothing back β€” she just does the thing. iconic behavior honestly πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • buffer β€” the ring buffer you want to stop writes to. she's the main character here, the big one, the whole trace buffer. 🫢
  • cpu β€” the CPU buffer to stop. yes, specifically that CPU. we're being surgical, not messy. πŸ’…

πŸ’– DESCRIPTION πŸ’–

so here's the tea, bestie: this function prevents all writes to the buffer. every single one. gone. blocked. no cap.

and if something tries to write to the buffer after this? it will fail and return NULL. 😭 that's it, that's the whole attempt, straight to NULL jail.

⚠️ important caller homework: the caller should call synchronize_rcu after this. don't skip it. it's not optional-vibes, it's the actual instruction. 🧚

πŸŽ€ SEE ALSO πŸŽ€

the source of all this wisdom lives in the kernel file ./kernel/trace/ring_buffer.c ⭐ β€” and here's the full friend group, every single one of them, in the original order:


and that's the whole page, bestie πŸ’œ she comes to you straight from ./kernel/trace, dated October 2026, and yes the docs really did name the footer file and the month like that β€” periodt. go call synchronize_rcu, ily, bye πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from