From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Jan Beulich <JBeulich@novell.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] linux-2.6.18/evtchn: clear secondary CPUs' cpu_evtchn_mask[] after restore
Date: Mon, 15 Nov 2010 17:28:03 -0800 [thread overview]
Message-ID: <4CE1DE23.9070002@goop.org> (raw)
In-Reply-To: <4CE1746002000078000224AA@vpn.id2.novell.com>
On 11/15/2010 08:56 AM, Jan Beulich wrote:
> To bind all event channels to CPU#0, it is not sufficient to set all of
> its cpu_evtchn_mask[] bits; all other CPUs also need to get their bits
> cleared. Otherwise, evtchn_do_upcall() will start handling interrupts
> on CPUs they're not intended to run on, which can be particularly bad
> for per-CPU ones.
Yes, that would be awkward.
> Signed-off-by: Jan Beulich <jbeulich@novell.com>
>
> --- a/drivers/xen/core/evtchn.c
> +++ b/drivers/xen/core/evtchn.c
> @@ -161,7 +161,8 @@ static void init_evtchn_cpu_bindings(voi
> set_native_irq_info(i, cpumask_of_cpu(0));
>
> memset(cpu_evtchn, 0, sizeof(cpu_evtchn));
> - memset(cpu_evtchn_mask[0], ~0, sizeof(cpu_evtchn_mask[0]));
> + for_each_possible_cpu(i)
> + memset(cpu_evtchn_mask[i], -!i, sizeof(cpu_evtchn_mask[i]));
-!i? Really? Golf-clap and all, but I think something a bit more
explicit would be better ;)
J
next prev parent reply other threads:[~2010-11-16 1:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-15 16:56 [PATCH] linux-2.6.18/evtchn: clear secondary CPUs' cpu_evtchn_mask[] after restore Jan Beulich
2010-11-15 17:02 ` Jan Beulich
2010-11-16 1:28 ` Jeremy Fitzhardinge [this message]
2010-11-16 7:42 ` Keir Fraser
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=4CE1DE23.9070002@goop.org \
--to=jeremy@goop.org \
--cc=JBeulich@novell.com \
--cc=xen-devel@lists.xensource.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.