irq_set_thread_affinity(9)
π irq_set_thread_affinity(9) π
okay bestie, this is the irq_set_thread_affinity(9) page from the Kernel API Manual, and it's literally about giving irq threads a lil nudge so they fix their own affinity. no cap, it's short and iconic. β¨
πΈ NAME πΈ
irq_set_thread_affinity β the function that notifies irq threads to adjust affinity π
π SYNOPSIS π
the whole signature is giving one-line main character energy:
void irq_set_thread_affinity (struct irq_desc *desc );
π¦ ARGUMENTS π¦
descβ the irq descriptor whose affinity has changed, periodt π
β¨ DESCRIPTION β¨
okay so the strategy is: just set IRQTF_AFFINITY and delegate the affinity setting to the interrupt thread itself. it's giving "you handle it, bestie" π«Ά
we literally can not call set_cpus_allowed_ptr here because we're holding desc->lock, and this code can be called from hard interrupt context. so yeah, that's the whole reason β no cap. π
bestie, this is not the place to call set_cpus_allowed_ptr. the lock + hard-interrupt-context combo is the whole vibe check here. π
π SEE ALSO π
Kernel file: ./kernel/irq/manage.c β and the whole squad is:
synchronize_hardirq(9)synchronize_irq(9)irq_can_set_affinity(9)irq_can_set_affinity_usr(9)irq_affinity_schedule_notify_work(9)irq_update_affinity_desc(9)irq_set_affinity(9)irq_force_affinity(9)irq_set_affinity_notifier(9)irq_set_vcpu_affinity(9)disable_irq_nosync(9)disable_irq(9)disable_hardirq(9)disable_nmi_nosync(9)enable_irq(9)enable_nmi(9)irq_set_irq_wake(9)irq_wake_thread(9)free_irq(9)request_threaded_irq(9)request_any_context_irq(9)request_nmi(9)irq_percpu_is_enabled(9)free_percpu_irq(9)request_percpu_irq_affinity(9)request_percpu_nmi(9)prepare_percpu_nmi(9)teardown_percpu_nmi(9)irq_get_irqchip_state(9)irq_set_irqchip_state(9)irq_has_action(9)irq_check_status_bit(9)
okay that's the whole page, bye bestie π«Ά this one comes from source ./kernel/irq, dated October 2026, and it's all about irq_set_thread_affinity(9). 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