linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Prarit Bhargava <prarit@redhat.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: linux-kernel@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] Use NUMA node cpu mask in irq affinity
Date: Thu, 09 Feb 2012 08:52:45 -0500	[thread overview]
Message-ID: <4F33CFAD.30602@redhat.com> (raw)
In-Reply-To: <CAE9FiQUbVVwN8s+fT84bOvz0xo93Pp9G58RecKYbyNKyXiEAKA@mail.gmail.com>



On 02/08/2012 06:51 PM, Yinghai Lu wrote:
> On Wed, Feb 8, 2012 at 12:48 PM, Prarit Bhargava <prarit@redhat.com> wrote:
>> The irq affinity files (/proc/irq/.../smp_affinity) contain a mask that is used
>> to "pin" an irq to a set of cpus.  On boot this set is currently all cpus.
>> This can be incorrect as ACPI SRAT may tell us that a specific device or
>> bus is attached to a particular node and it's cpus.
>>
>> When setting up the irq affinity we should take into account the NUMA node
>> cpu mask by and'ing it into the irq's affinity mask.
>>
>> Signed-off-by: Prarit Bhargava <prarit@redhat.com>
>> Acked-by: Neil Horman <nhorman@tuxdriver.com>
>> ---
>>  kernel/irq/manage.c |    2 ++
>>  1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
>> index a9a9dbe..2fb3469 100644
>> --- a/kernel/irq/manage.c
>> +++ b/kernel/irq/manage.c
>> @@ -301,6 +301,8 @@ setup_affinity(unsigned int irq, struct irq_desc *desc, struct cpumask *mask)
>>        }
>>
>>        cpumask_and(mask, cpu_online_mask, set);
>> +       if (desc->irq_data.node != -1)
>> +               cpumask_and(mask, mask, cpumask_of_node(desc->irq_data.node));
>>        ret = chip->irq_set_affinity(&desc->irq_data, mask, false);
>>        switch (ret) {
>>        case IRQ_SET_MASK_OK:
>> --
> 
> How about all cpus on that node get offlined?

Good point.  I guess that also goes to tglx's comments wondering what happens if the mask ends up being zero.

I'll think about that and send out a new patch shortly.

P.
> 
> Yinghai

  reply	other threads:[~2012-02-09 13:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-08 20:48 [PATCH] Use NUMA node cpu mask in irq affinity Prarit Bhargava
2012-02-08 23:51 ` Yinghai Lu
2012-02-09 13:52   ` Prarit Bhargava [this message]
2012-02-09 10:36 ` Thomas Gleixner

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=4F33CFAD.30602@redhat.com \
    --to=prarit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=yinghai@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).