STRUCT TMIGR_CPU(9)
β¨ struct tmigr_cpu(9) β¨
okay so bestie, buckle up π this is a page from the Kernel API Manual β yes, that Kernel API Manual β and it's all about struct tmigr_cpu, which is the timer migration per-CPU group situation. it's giving very niche, very kernel, very "iykyk" energy π§ and honestly? we're obsessed.
πΈ NAME πΈ
struct tmigr_cpu β timer migration per CPU group. that's it, that's the whole vibe π
π SYNOPSIS π
here's the whole struct, laid out exactly, no cap:
struct tmigr_cpu {
raw_spinlock_t lock;
bool available;
bool idle;
bool remote;
struct tmigr_group *tmgroup;
u8 groupmask;
u64 wakeup;
struct tmigr_event cpuevt;
};
π Members π
okay now the member-by-member deep dive, and yes we're going through all of them, because every single field is a main character here π«Ά
lockβ this bad boy is the lock protecting thetmigr_cpugroup information. it's araw_spinlock_t, so like, respect it π₯availableβ tells you whether the CPU is available for handling global timers. and bestie, this one does work:- in the deactivate path, you need it to know whether the migrator in the top level group is to be set offline, while a timer is pending. and when that happens? another available CPU needs to be notified to take over the migrator role. handoff time π
- plus, the information is required in the CPU hotplug path, because the CPU is able to go idle before the timer migration hierarchy hotplug callback is reached. during this phase, the CPU has to handle the global timers on its own and must not act as a migrator. so like... it's doing its own thing, solo, no migrator hat allowed π
idleβ indicates whether the CPU is idle in the timer migration hierarchy. simple, clean, iconic β¨remoteβ gets set when the timers of the CPU are expired remotely. remote expiry, very 2026 of it πtmgroupβ pointer to the parent group. it's astruct tmigr_group *, and it points at its parent, familial vibes fr fr πΈgroupmaskβ mask oftmigr_cpuin the parent group. it's au8, tiny but mighty π¦wakeupβ stores the first timer when the timer migration hierarchy is completely idle and remote expiry was done. it's returned to the timer code in the idle path, and it's only used in the idle path. very exclusive, very VIP, love that for it πcpuevtβ the CPU event, which could be enqueued into the parent group. astruct tmigr_event, ready to make moves whenever π
π₯ SEE ALSO π₯
go read these next, bestie, they're all in the kernel file ./kernel/time/timer_migration.h:
struct tmigr_hierarchy(9)struct tmigr_event(9)struct tmigr_group(9)union tmigr_state(9)
π real talk though: this page lives in ./kernel/time, and it's dated October 2026 β so yeah, mark your calendar, the kernel is apparently ahead of schedule β
and that's the whole page, bestie β go forth and migrate those timers responsibly ππ«Άπβ¨
π¦ 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