From: Prarit Bhargava <prarit@redhat.com>
To: rui wang <ruiv.wang@gmail.com>
Cc: Tony Luck <tony.luck@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
X86-ML <x86@kernel.org>, Michel Lespinasse <walken@google.com>,
Andi Kleen <ak@linux.intel.com>,
Seiji Aguchi <seiji.aguchi@hds.com>,
Yang Zhang <yang.z.zhang@intel.com>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
janet.morgan@intel.com, "Yu, Fenghua" <fenghua.yu@intel.com>,
chen gong <gong.chen@linux.intel.com>
Subject: Re: [PATCH] x86: Add check for number of available vectors before CPU down [v2]
Date: Mon, 30 Dec 2013 10:08:27 -0500 [thread overview]
Message-ID: <52C18C6B.8090802@redhat.com> (raw)
In-Reply-To: <CANVTcTbNqwzVBzqzGisbUJGtVCa9RtA6OuD4hVp0O39Nz_KDrQ@mail.gmail.com>
On 12/30/2013 07:56 AM, rui wang wrote:
> An irq can be mapped to only one vector number, but can have multiple
> destination CPUs. i.e. the same irq/vector can appear on multiple
> CPUs' vector_irq[]. So checking data->affinity is necessary I think.
That's true Rui -- but here's what I think the scenario actually is.
Suppose we have a 4-cpu system, and we have an IRQ that is mapped to multiple
cpu's vector_irq[]. For example, we have IRQ 200 that is mapped to CPU 2
vector_irq[50], and CPU 3 vector_irq[60].
Now I 'echo 0 > /sys/devices/system/cpu/cpu3/online'.
cpu_disable is called and the kernel migrates IRQs off to other cpus.
Regardless if IRQ 200 is already mapped to CPU2 vector_irq[50], the mapping for
CPU 3 vector_irq[60] *must be migrated* to another CPU. It has a valid irq
handler and the IRQ is active. It doesn't just disappear because the CPU went down.
ie) AFAICT we should not differentiate between a multiple mapped IRQ and a
singly mapped IRQ when traversing the vector_irq[] for CPU 3.
I'm probably being dense on this but I'm not seeing a problem with migrating the
IRQ.
> But notice that data->affinity is updated in chip->irq_set_affinity()
> inside fixup_irqs(), while cpu_online_mask is updated in
> remove_cpu_from_maps() inside cpu_disable_common().
It shouldn't matter that the maps are updated in different areas during the
execution as we're in stop_machine().
They are updated
> in different places. So the algorithm to check them against each other
> should be different, depending on where you put the check_vectors().
> That's my understanding.
>
P.
> Thanks
> Rui
next prev parent reply other threads:[~2013-12-30 15:08 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-18 19:29 [PATCH] x86: Add check for number of available vectors before CPU down [v2] Prarit Bhargava
2013-12-18 19:50 ` Tony Luck
2013-12-19 18:05 ` Tony Luck
2013-12-19 18:11 ` Prarit Bhargava
2013-12-20 7:18 ` Chen, Gong
2013-12-20 9:41 ` rui wang
2013-12-20 10:49 ` Prarit Bhargava
2013-12-28 17:10 ` Prarit Bhargava
2013-12-30 7:44 ` Chen, Gong
2013-12-30 15:09 ` Prarit Bhargava
2013-12-30 12:56 ` rui wang
2013-12-30 15:08 ` Prarit Bhargava [this message]
2013-12-31 2:58 ` rui wang
2013-12-31 21:22 ` Prarit Bhargava
2014-01-02 2:41 ` Chen, Gong
2014-01-02 12:57 ` Prarit Bhargava
2014-01-02 16:04 ` Prarit Bhargava
2013-12-30 17:22 ` Prarit Bhargava
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=52C18C6B.8090802@redhat.com \
--to=prarit@redhat.com \
--cc=ak@linux.intel.com \
--cc=fenghua.yu@intel.com \
--cc=gong.chen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=janet.morgan@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paul.gortmaker@windriver.com \
--cc=ruiv.wang@gmail.com \
--cc=seiji.aguchi@hds.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@gmail.com \
--cc=walken@google.com \
--cc=x86@kernel.org \
--cc=yang.z.zhang@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.