From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>
Cc: Ian Campbell <Ian.Campbell@eu.citrix.com>,
Sander Eikelenboom <linux@eikelenboom.it>,
Keir Fraser <keir@xen.org>,
Ian Jackson <Ian.Jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>
Subject: Re: [PATCH] correct mis-conversion set_bit() -> __cpumask_set_cpu() by 4aaca0e9cd
Date: Mon, 23 Feb 2015 12:01:20 +0000 [thread overview]
Message-ID: <54EB1690.3040709@citrix.com> (raw)
In-Reply-To: <54EB17A802000078000626F9@mail.emea.novell.com>
[-- Attachment #1.1: Type: text/plain, Size: 1284 bytes --]
On 23/02/15 11:06, Jan Beulich wrote:
> I have no idea how I came to use __cpumask_set_cpu() there, the
> conversion should have been set_bit() -> __set_bit(). The wrong
> construct results in problems on systems with relatively few CPUs.
>
> Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Insofar as this clearly corrects the identified regression,
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
However, I am still not convinced that the resulting code is actually
correct.
batch_mask is a cpumask_t and used properly as a cpumask in
cpumask_raise_softirq(). It is wrong to be putting softirq indices into
it here.
>
> --- a/xen/common/softirq.c
> +++ b/xen/common/softirq.c
> @@ -106,7 +106,7 @@ void cpu_raise_softirq(unsigned int cpu,
> if ( !per_cpu(batching, this_cpu) || in_irq() )
> smp_send_event_check_cpu(cpu);
> else
> - __cpumask_set_cpu(nr, &per_cpu(batch_mask, this_cpu));
> + __set_bit(nr, &per_cpu(batch_mask, this_cpu));
> }
>
> void cpu_raise_softirq_batch_begin(void)
>
>
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
[-- Attachment #1.2: Type: text/html, Size: 2341 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-02-23 12:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-23 11:06 [PATCH] correct mis-conversion set_bit() -> __cpumask_set_cpu() by 4aaca0e9cd Jan Beulich
2015-02-23 11:17 ` Sander Eikelenboom
2015-02-23 12:01 ` Andrew Cooper [this message]
2015-02-23 13:47 ` Jan Beulich
2015-02-26 16:53 ` Sander Eikelenboom
2015-02-27 7:33 ` Jan Beulich
2015-02-27 10:34 ` Ian Campbell
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=54EB1690.3040709@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Campbell@eu.citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=linux@eikelenboom.it \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.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 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.