STRUCT RCU_TASKS(9)
π 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 lastgp_statetransitiongp_startβ most recent grace-period start in jiffiestasks_gp_seqβ number of grace periods completed since boot in upper bitsn_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 functionpregp_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'scall_rcu-equivalentfunctionwait_stateβ task state for synchronous grace-period waits (defaultTASK_UNINTERRUPTIBLE) π€rtpcpuβ this flavor'srcu_tasks_percpustructurertpcp_arrayβ array of pointers torcu_tasks_percpustructure of CPUs incpu_possible_maskpercpu_enqueue_shiftβ shift down CPU ID this much when enqueuing callbackspercpu_enqueue_limβ number of per-CPU callback queues in use for enqueuingpercpu_dequeue_limβ number of per-CPU callback queues in use for dequeuingpercpu_dequeue_gpseqβ RCU grace-period number to propagate enqueue limit to dequeuersbarrier_q_mutexβ serialize barrier operationsbarrier_q_countβ number of queues being waited onbarrier_q_completionβ barrier wait/wakeup mechanismbarrier_q_seqβ sequence number for barrier operationsbarrier_q_startβ most recent barrier start in jiffiesnameβ this flavor's textual nameknameβ this flavor's kthread name
π SEE ALSO π
- Kernel file
./kernel/rcu/tasks.h struct rcu_tasks_percpu(9)call_rcu_tasks(9)synchronize_rcu_tasks(9)rcu_barrier_tasks(9)synchronize_rcu_tasks_rude(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms