Bug 433534

Summary: kernel-rt-2.6.24.1-24.el5rt ignores irq-affinity on some nvidia chipsets
Product: Red Hat Enterprise MRG Reporter: Seth Hunter <hunter>
Component: realtime-kernelAssignee: Steven Rostedt <srostedt>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: low    
Version: betaCC: williams
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-03-11 15:07:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch to fix x86 64 irq smp affinity none

Description Seth Hunter 2008-02-19 21:44:39 UTC
The recent upgrade to the 2.6.24-based RT kernel seems to have broken the
ability on some systems to bind hardware interrupts to specific CPUs. 
Empirically, this seems like it may only happen on nvidia/nforce-based motherboards.

On affected systems, echo'ing a processor mask into /proc/irq/#/smp_affinity is
successful (i.e. a subsequent cat of the file shows the desired value), but
/proc/interrupts continues to show all interrupts arriving on CPU0.  This
capability worked correctly in the 2.6.21-based MRG kernel.

Comment 1 Steven Rostedt 2008-02-20 00:17:30 UTC
Created attachment 295360 [details]
patch to fix x86 64 irq smp affinity


It seems that x86_64 isn't honoring smp_affinity changes for level interrupts.
Looking into this, I found that the code to change the affinity is delayed
(CONFIG_GENERIC_PENDING_IRQ) to a better time to touch the apic. The changes
are made in the ack of the interrupt. But the code in the ack will not change
the apic if an irq is in progress.

On vanilla, this is fine, because the IRQ_INPROGRESS bit is cleared before
acking. But with threaded interrupts, we keep the IRQ_INPROGRESS bit set
through out the ack. This bit doesn't get cleared until after the thread is
run.

The race that this is trying to prevent is not applicable when interrupts are
threaded. This patch will perform the update to the smp affinity of the irq in
the ack when interrupts are threaded, regardless of the IRQ_INPROGRESS bit.

Comment 2 Seth Hunter 2008-02-20 02:48:45 UTC
I can confirm that Steven's patch fixed the issue on my machines.  Thanks!