STRUCT RCU_TASKS_PERCPU(9)
π NAME π
struct rcu_tasks_percpu β okay so this is the per-CPU piece of a Tasks-RCU-like mechanism's definition, and yes that's a mouthful but we're gonna get through it together bestie π«Ά
So like, in the Kernel API Manual (that's the manual this page lives in, hiii β¨), this struct is literally the per-CPU component of a Tasks-RCU-style thing. One of these per CPU, no cap.
β¨ SYNOPSIS β¨
struct rcu_tasks_percpu {
struct rcu_segcblist cblist;
raw_spinlock_t lock;
unsigned long rtp_jiffies;
unsigned long rtp_n_lock_retries;
struct timer_list lazy_timer;
unsigned int urgent_gp;
struct work_struct rtp_work;
struct irq_work rtp_irq_work;
struct rcu_head barrier_q_head;
struct list_head rtp_blkd_tasks;
struct list_head rtp_exit_list;
int cpu;
int index;
struct rcu_tasks *rtpp;
};
Like, look at her. Fourteen members, all iconic, all doing their own little job π
π Members π
Here's the vibe check on every single field, in order, because we do not skip:
cblistβ the callback list. That's it, that's the girl. πlockβ araw_spinlock_tthat protects the per-CPU callback list. Guard her at all costs πrtp_jiffiesβ jiffies counter value, but specifically for statistics. Numbers for the vibes πrtp_n_lock_retriesβ a rough lock-contention statistic. Rough! It said rough, don't @ me πlazy_timerβ a timer whose whole personality is unlazifying callbacks. Get up bestie β°urgent_gpβ number of additional non-lazy grace periods. Urgent! π¨rtp_workβ work queue for invoking callbacks. She's got a queue and she's working it πrtp_irq_workβ IRQ work queue, for deferred wakeups. Waking up later, on purpose πbarrier_q_headβ anstruct rcu_headthat serves as the RCU callback for a barrier operation. Barrier queen π§±rtp_blkd_tasksβ list of tasks blocked as readers. Free them π€rtp_exit_listβ list of tasks in the latter portion ofdo_exit. They're leaving, let them leave πͺcpuβ the CPU number corresponding to this entry. Which CPU? This CPU. π₯οΈindexβ index of this CPU inrtpcp_arrayof thercu_tasksstructure. Your seat number in the group chat πͺrtppβ pointer to thercu_tasksstructure. Her parent, her home base π
ngl if you're touching lock you better actually be holding it β it's the lock protecting the per-CPU callback list, so like, do the thing properly fr fr π
π SEE ALSO π
Kernel file ./kernel/rcu/tasks.h plus these besties, go read them too:
struct rcu_tasks(9)call_rcu_tasks(9)synchronize_rcu_tasks(9)rcu_barrier_tasks(9)synchronize_rcu_tasks_rude(9)
okay that's the whole page, you ate that π This little number ships from the source ./kernel/rcu, dated October 2026, and it's filed under struct rcu_tasks_percpu(9) β mwah, periodt π
π¦ 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