STRUCT RCU_TASKS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay bestie, this is the Kernel API Manual page for struct rcu_tasks(9) β€” literally the definition for a Tasks-RCU-like mechanism. no cap, it's giving kernel-internals realness ✨

✨ SYNOPSIS ✨

here's the whole struct, exactly as it appears, because we do not play with technical accuracy in this group chat 🫢

       struct rcu_tasks {
           struct rcuwait cbs_wait;
           raw_spinlock_t cbs_gbl_lock;
           struct mutex tasks_gp_mutex;
           int gp_state;
           int gp_sleep;
           int init_fract;
           unsigned long gp_jiffies;
           unsigned long gp_start;
           unsigned long tasks_gp_seq;
           unsigned long n_ipis;
           struct task_struct *kthread_ptr;
           unsigned long lazy_jiffies;
           rcu_tasks_gp_func_t gp_func;
           pregp_func_t pregp_func;
           pertask_func_t pertask_func;
           postscan_func_t postscan_func;
           holdouts_func_t holdouts_func;
           postgp_func_t postgp_func;
           call_rcu_func_t call_func;
           unsigned int wait_state;
           struct rcu_tasks_percpu __percpu *rtpcpu;
           struct rcu_tasks_percpu **rtpcp_array;
           int percpu_enqueue_shift;
           int percpu_enqueue_lim;
           int percpu_dequeue_lim;
           unsigned long percpu_dequeue_gpseq;
           struct mutex barrier_q_mutex;
           atomic_t barrier_q_count;
           struct completion barrier_q_completion;
           unsigned long barrier_q_seq;
           unsigned long barrier_q_start;
           char *name;
           char *kname;
        };

🧚 Members 🧚

  • cbs_wait β€” RCU wait allowing a new callback to get kthread's attention. πŸ‘€
  • cbs_gbl_lock β€” lock protecting callback list πŸ”’
  • tasks_gp_mutex β€” mutex protecting grace period, needed during mid-boot dead zone 🫠
  • gp_state β€” grace period's most recent state transition, for debugging πŸ›
  • gp_sleep β€” per-grace-period sleep to prevent CPU-bound looping 😴
  • init_fract β€” initial backoff sleep interval ⏳
  • gp_jiffies β€” time of last gp_state transition
  • gp_start β€” most recent grace-period start in jiffies
  • tasks_gp_seq β€” number of grace periods completed since boot in upper bits
  • n_ipis β€” number of IPIs sent to encourage grace periods to end πŸ“£
  • kthread_ptr β€” this flavor's grace-period/callback-invocation kthread 🧡
  • lazy_jiffies β€” number of jiffies to allow callbacks to be lazy πŸ›‹οΈ
  • gp_func β€” this flavor's grace-period-wait function
  • pregp_func β€” this flavor's pre-grace-period function (optional) ✨
  • pertask_func β€” this flavor's per-task scan function (optional)
  • postscan_func β€” this flavor's post-task scan function (optional)
  • holdouts_func β€” this flavor's holdout-list scan function (optional)
  • postgp_func β€” this flavor's post-grace-period function (optional)
  • call_func β€” this flavor's call_rcu-equivalent function
  • wait_state β€” task state for synchronous grace-period waits (default TASK_UNINTERRUPTIBLE) πŸ’€
  • rtpcpu β€” this flavor's rcu_tasks_percpu structure
  • rtpcp_array β€” array of pointers to rcu_tasks_percpu structure of CPUs in cpu_possible_mask
  • percpu_enqueue_shift β€” shift down CPU ID this much when enqueuing callbacks
  • percpu_enqueue_lim β€” number of per-CPU callback queues in use for enqueuing
  • percpu_dequeue_lim β€” number of per-CPU callback queues in use for dequeuing
  • percpu_dequeue_gpseq β€” RCU grace-period number to propagate enqueue limit to dequeuers
  • barrier_q_mutex β€” serialize barrier operations
  • barrier_q_count β€” number of queues being waited on
  • barrier_q_completion β€” barrier wait/wakeup mechanism
  • barrier_q_seq β€” sequence number for barrier operations
  • barrier_q_start β€” most recent barrier start in jiffies
  • name β€” this flavor's textual name
  • kname β€” this flavor's kthread name

🌈 SEE ALSO 🌈


byeee πŸ’… this page came from the ./kernel/rcu source, dated October 2026, and it is literally the struct rcu_tasks(9) manual β€” mwah πŸŽ€

πŸ“¦ where this page comes from