All of lore.kernel.org
 help / color / mirror / Atom feed
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 v2] complete conversion set_bit() -> __cpumask_set_cpu() by 4aaca0e9cd
Date: Mon, 23 Feb 2015 13:49:50 +0000	[thread overview]
Message-ID: <54EB2FFE.7000904@citrix.com> (raw)
In-Reply-To: <54EB3D880200007800062834@mail.emea.novell.com>

On 23/02/15 13:47, Jan Beulich wrote:
> While converting to __cpumask_set_cpu() was correct, the first argument
> passed should have been corrected to be "cpu" instead of "nr" at once.
> 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>

Looks better.

Reviewed-by: Andrew Cooper <andrew.cooper3@citirx.com>

> ---
> v2: As Andrew points out the original code was wrong too, and hence
>     the use of __cpumask_set_cpu) was correct. What was wrong was the
>     use of "nr" as the bit position.
>
> --- 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));
> +        __cpumask_set_cpu(cpu, &per_cpu(batch_mask, this_cpu));
>  }
>  
>  void cpu_raise_softirq_batch_begin(void)
>
>
>

      reply	other threads:[~2015-02-23 13:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-23 13:47 [PATCH v2] complete conversion set_bit() -> __cpumask_set_cpu() by 4aaca0e9cd Jan Beulich
2015-02-23 13:49 ` Andrew Cooper [this message]

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=54EB2FFE.7000904@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.