lkml.org 
[lkml]   [2003]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC][Patch] fix for irq_affinity_write_proc v2.5
From
Date
> Why should the kernel be enforcing policy here. You have to be root to 
> do this, and root should have the ability to configure apparently stupid
> things because they may find them useful.

What the kernel does now seems incorrect.
With kirqd runnig (irqbalance_disable == 0) the kernel writes an
arbitrary cpu mask to the ioapic. The kirqd thread only maps the irq to
a single cpu at at time. Mapping an irq to multiple cpus breaks this
ideal. A root user could destroy what kirqd is doing for them by trying
to set affinity which writes to the ioapic directly. Let kirqd manage
the affinity. (NOTE: I suspect that do_irq_balance might not set
affinity until the irq needs to be balance and am looking for a better
thing to do.)
Also if a user writes an arbitrary cpu map to the ioapic next time the
irq need to be balanced by kirqd their value will be overwritten. The
affinity defined in irq_affinity array will still be valid but the
mapping the user wrote to the ioapic will be destroyed.
This seems to be a loose loose situation. If users want to do map
irqs to multiple cpus, at the ioapic level, they should user their root
privileges to boot with noirqbalance. If kirqd is running the should
let it do most of the work.

Keith


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.077 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site