Current IRQ affinity interface does not provide a way to set affinity
for the IRQs that will be allocated/activated in the future.
This patch creates /proc/irq/default_smp_affinity that lets users set
default affinity mask for the newly allocated IRQs. Changing the default
does not affect affinity masks for the currently active IRQs, they
have to be changed explicitly.Updated based on Paul J's comments and added some more documentation.
Signed-off-by: Max Krasnyansky <maxk@qualcomm.com>
---
Documentation/IRQ-affinity.txt | 37 +++++++++++++++++-----
Documentation/filesystems/proc.txt | 29 +++++++++++-------
arch/alpha/kernel/irq.c | 5 +--
include/linux/irq.h | 14 +++-----
kernel/irq/manage.c | 28 ++++++++++++++++-
kernel/irq/proc.c | 59 +++++++++++++++++++++++++++++++++--
6 files changed, 134 insertions(+), 38 deletions(-)diff --git a/Documentation/IRQ-affinity.txt b/Documentation/IRQ-affinity.txt
index 938d7dd..5f07fa5 100644
--- a/Documentation/IRQ-affinity.txt
+++ b/Documentation/IRQ-affinity.txt
@@ -1,17 +1,26 @@
+ChangeLog:
+ Started by Ingo Molnar <mingo@redhat.com>
+ Update by Max Krasnyansky <maxk@qualcomm.com>-SMP IRQ affinity, started by Ingo Molnar <mingo@redhat.com>
-
+SMP IRQ affinity/proc/irq/IRQ#/smp_affinity specifies which target CPUs are permitted
for a given IRQ source. It's a bitmask of allowed CPUs. It's not allowed
to turn off all CPUs, and if an IRQ controller does not support IRQ
affinity then the value will not change from the default 0xffffffff.+/proc/irq/default_smp_affinity specifies default affinity mask that applies
+to all non-active IRQs. Once IRQ is allocated/activated its affinity bitmask
+will be set to the default mask. It can then be changed as described above.
+Default mask is 0xffffffff.
+
Here is an example of restricting IRQ44 (eth1) to CPU0-3 then restricting
-the IRQ to CPU4-7 (this is an 8-CPU SMP box):
+...
Max,
I realized, when reading this again, that the default masks
are not ffffffff. That's the default only on systems with
no more than 32 CPUs. Rather I suspect that the default is
CPU_MASK_ALL. Indeed, your patch has:cpumask_t irq_default_affinity = CPU_MASK_ALL;
This affects a few mentions of ffffffff in the Docs.
Otherwise looks good - thanks.
Acked-by: Paul Jackson <pj@sgi.com>
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.940.382.4214
--
Thanx.
btw What's the procedure for including Acked-by ?
cut&paste into the patch description and resend ?Max
--
If the acked-by comes fairly shortly after the original
patch, and isn't excessively buried in a bunch of discussion,
then Andrew will catch it, and add it to the patch in his
queue.If you have to resubmit the patch anyway, then of course,
add the acked-by then.If neither of the above applies, and the acked-by is lost,
but your patch is successfully applied anyway, then either of
(1) if you're feeling lazy, don't worry about it, or
(2) reply again to that lkml thread, being sure akpm is on
the cc list, asking Andrew to add the acked-by.Andrew is the expert, of course, in such matters.
If he says something contrary to the above, ignore me.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.940.382.4214
--
| Eric W. Biederman | [PATCH 02/10] sysfs: Support for preventing unmounts. |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| david | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
git: | |
| Antonio Almeida | HTB accuracy for high speed |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 26/37] dccp: Integration of dynamic feature activation - part 1 (socket set... |
| David Miller | [GIT]: Networking |
