STRUCT IRQ_AFFINITY(9)
๐ struct irq_affinity(9) โ like, the whole vibe
okay so bestie, welcome to the Kernel API Manual page for struct irq_affinity(9) โ yes that's the actual manual name, we're in the kernel docs now, main character energy only ๐ซถ
โจ NAME โจ
struct irq_affinity โ the description you hand the kernel so it can do automatic irq affinity assignments for you, no cap ๐
๐ธ SYNOPSIS ๐ธ
struct irq_affinity {
unsigned int pre_vectors;
unsigned int post_vectors;
unsigned int nr_sets;
unsigned int set_size[IRQ_AFFINITY_MAX_SETS];
void (*calc_sets)(struct irq_affinity *, unsigned int nvecs);
void *priv;
};
like, that's the whole struct, literally copy it into your brain bestie ๐ง โจ
๐ Members ๐
(these are the fields, and yes every single one matters, don't skip ๐)
pre_vectorsโ don't apply affinity topre_vectorsat the beginning of the MSI(-X) vector space. it's giving "leave the opening act alone" ๐post_vectorsโ don't apply affinity topost_vectorsat the end of the MSI(-X) vector space. closing act stays untouched too ๐ญnr_setsโ the number of interrupt sets for which affinity spreading is required. count your sets, bestie ๐ขset_sizeโ an array holding the size of each interrupt set. every set gets its own little size slot ๐calc_setsโ callback for calculating the number and size of interrupt sets. the function signature is literallyvoid (*calc_sets)(struct irq_affinity *, unsigned int nvecs);โ it does the math so you don't have to ๐งฎโจprivโ private data for usage bycalc_sets, usually a pointer to driver/device specific data. it's your little secret stash, iykyk ๐คซ
๐ฅ SEE ALSO ๐ฅ
go touch some of these next, they're all iconic ๐
- Kernel file
./include/linux/interrupt.hstruct irqaction(9) request_irq(9)struct irq_affinity_notify(9)struct irq_affinity_desc(9)irq_update_affinity_hint(9)irq_set_affinity_and_hint(9)
and that's the page bestie!! ๐ it lives in ./include/linux and the version stamp says October 2026 โ so like, future-core of you to be reading this fr fr. slay, go set some affinities, 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