From: Randy Dunlap <rdunlap@xenotime.net>
To: Max Krasnyansky <maxk@qualcomm.com>
Cc: mingo@elte.hu, linux-kernel@vger.kernel.org, pj@sgi.com,
a.p.zijlstra@chello.nl, tglx@linutronix.de
Subject: Re: [PATCH] [genirq] Expose default irq affinity mask
Date: Fri, 23 May 2008 13:47:02 -0700 [thread overview]
Message-ID: <20080523134702.e5fb9145.rdunlap@xenotime.net> (raw)
In-Reply-To: <1211571995-17488-1-git-send-email-maxk@qualcomm.com>
On Fri, 23 May 2008 12:46:35 -0700 Max Krasnyansky wrote:
> 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 default
> does not affect affinity masks for the currently active IRQs, they
> have to be changed explicitly.
Documentation, perhaps an update to Documentation/filesystems/proc.txt ?
> Signed-off-by: Max Krasnyansky <maxk@qualcomm.com>
> ---
> arch/alpha/kernel/irq.c | 5 +--
> include/linux/irq.h | 14 ++++-------
> kernel/irq/manage.c | 28 +++++++++++++++++++++-
> kernel/irq/proc.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++-
> 4 files changed, 89 insertions(+), 15 deletions(-)
>
> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
> index 438a014..90f9ccc 100644
> --- a/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -16,6 +16,8 @@
>
> #ifdef CONFIG_SMP
>
> +cpumask_t irq_default_affinity = CPU_MASK_ALL;
> +
> /**
> * synchronize_irq - wait for pending IRQ handlers (on other CPUs)
> * @irq: interrupt number to wait for
> @@ -94,6 +96,27 @@ int irq_set_affinity(unsigned int irq, cpumask_t cpumask)
> return 0;
> }
>
> +#ifndef CONFIG_AUTO_IRQ_AFFINITY
> +/**
> + * Generic version of the affinity autoselector.
> + */
Please don't use /** as the beginning of a comment block unless that
comment block is in kernel-doc format (this one is not).
> +int irq_select_affinity(unsigned int irq)
> +{
> + cpumask_t mask;
> +
> + if (!irq_can_set_affinity(irq))
> + return 0;
> +
> + cpus_and(mask, cpu_online_map, irq_default_affinity);
> +
> + irq_desc[irq].affinity = mask;
> + irq_desc[irq].chip->set_affinity(irq, mask);
> +
> + set_balance_irq_affinity(irq, mask);
> + return 0;
> +}
> +#endif
---
~Randy
next prev parent reply other threads:[~2008-05-23 20:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-23 19:46 Max Krasnyansky
2008-05-23 20:47 ` Randy Dunlap [this message]
2008-05-23 20:50 ` Max Krasnyanskiy
2008-05-23 22:54 ` Paul Jackson
2008-05-24 0:39 ` Max Krasnyanskiy
2008-05-24 0:53 ` Paul Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080523134702.e5fb9145.rdunlap@xenotime.net \
--to=rdunlap@xenotime.net \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=maxk@qualcomm.com \
--cc=mingo@elte.hu \
--cc=pj@sgi.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®