STRUCT KFREE_RCU_CPU_WORK(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct kfree_rcu_cpu_work(9) πŸ¦‹

okay so this is a page straight out of the Kernel API Manual, and bestie, we're talking about struct kfree_rcu_cpu_work β€” literally the single batch of kfree_rcu() requests πŸ’…. That's the whole vibe. One struct, one batch, one grace period, no cap.


πŸ’– NAME πŸ’–

struct kfree_rcu_cpu_work β€” single batch of kfree_rcu() requests ✨

🌸 SYNOPSIS 🌸

like, here's the whole glow-up, exactly as written:

struct kfree_rcu_cpu_work {
    struct rcu_work rcu_work;
    struct kvfree_rcu_head *head_free;
    struct rcu_gp_seq head_free_gp_snap;
    struct list_head bulk_head_free[FREE_N_CHANNELS];
    struct kfree_rcu_cpu *krcp;
 };

πŸŽ€ Members πŸŽ€

  • rcu_work β€” this one's the plug ✨ it lets queue_rcu_work invoke the workqueue handler after a grace period. patient queen behavior honestly.
  • head_free β€” the list of kfree_rcu objects that are just sitting there waiting for a grace period 🫢
  • head_free_gp_snap β€” a grace-period snapshot, and its whole job is to check for attempted premature frees 😭 like, don't free early babe, that's not the move.
  • bulk_head_free β€” the bulk-list of kvfree_rcu objects waiting for a grace period πŸ¦‹ (yes it's an array, yes it's iconic)
  • krcp β€” a pointer to the kfree_rcu_cpu structure πŸ‘‘

⭐ SEE ALSO ⭐

go read these next, iykyk πŸ”₯ β€” Kernel file ./mm/slab_common.c __kmem_cache_create_args(9), kmem_buckets_create(9), kmem_cache_shrink(9), kmem_dump_obj(9), kfree_sensitive(9), struct kvfree_rcu_bulk_data(9), struct kfree_rcu_cpu(9), kvfree_rcu_barrier(9), kvfree_rcu_barrier_on_cache(9)


and that's the page bestie, no notes 🌈 this little gem lives in ./mm, and it's dated October 2026 β€” so like, future iconic πŸ’€πŸ’œ mwah, go touch some grace periods 🧚

πŸ“¦ where this page comes from