All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Ingo Molnar <mingo@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: Rabin Vincent <rabin@rab.in>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Paul E. McKenney" <paulmck@us.ibm.com>
Subject: Re: qemu:arm test failure due to commit 8053871d0f7f (smp: Fix smp_call_function_single_async() locking)
Date: Sun, 19 Apr 2015 07:08:23 -0700	[thread overview]
Message-ID: <5533B6D7.9050101@roeck-us.net> (raw)
In-Reply-To: <20150419093112.GA6139@gmail.com>

On 04/19/2015 02:31 AM, Ingo Molnar wrote:
>
> * Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
>> On Sun, Apr 19, 2015 at 4:48 AM, Linus Torvalds
>> <torvalds@linux-foundation.org> wrote:
>>>
>>> Does that smaller patch work equally well?
>>
>> .. and here's a properly formatted email and patch.
>>
>>             Linus
>
>>   kernel/smp.c | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/kernel/smp.c b/kernel/smp.c
>> index 2aaac2c47683..07854477c164 100644
>> --- a/kernel/smp.c
>> +++ b/kernel/smp.c
>> @@ -159,8 +159,10 @@ static int generic_exec_single(int cpu, struct call_single_data *csd,
>>   	}
>>
>>
>> -	if ((unsigned)cpu >= nr_cpu_ids || !cpu_online(cpu))
>> +	if ((unsigned)cpu >= nr_cpu_ids || !cpu_online(cpu)) {
>> +		csd_unlock(csd);
>>   		return -ENXIO;
>> +	}
>
> Acked-by: Ingo Molnar <mingo@kernel.org>
>
Tested-by: Guenter Roeck <linux@roeck-us.net>

> Btw., in this case we should probably also generate a WARN_ONCE()
> warning?
>
> I _think_ most such callers calling an SMP function call for offline
> or out of range CPUs are at minimum racy.
>
Not really; at least the online cpu part is an absolutely normal use
case for qemu-arm.

Sure, you can argue that "this isn't the real system", and that
qemu-arm should be "fixed", but there are reasons - the emulation
is (much) slower if the number of CPUs is set to 4, and not everyone
who wants to use qemu has a system with as many CPUs as the emulated
system would normally have.

Thanks,
Guenter


  reply	other threads:[~2015-04-19 14:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-18 23:23 qemu:arm test failure due to commit 8053871d0f7f (smp: Fix smp_call_function_single_async() locking) Guenter Roeck
2015-04-18 23:40 ` Guenter Roeck
2015-04-19  0:04   ` Linus Torvalds
2015-04-19  0:36     ` Guenter Roeck
2015-04-19  1:56     ` Guenter Roeck
2015-04-19  3:39       ` Rabin Vincent
2015-04-19  4:03         ` Guenter Roeck
     [not found]         ` <CA+55aFw4FSja+VBuCYJ7wLXKVRQZ7w6vOUaUJ4B=FXyBmNkrUg@mail.gmail.com>
2015-04-19  8:56           ` Linus Torvalds
2015-04-19  9:31             ` Ingo Molnar
2015-04-19 14:08               ` Guenter Roeck [this message]
2015-04-19 18:01                 ` Ingo Molnar
2015-04-19 20:34                   ` Linus Torvalds
2015-04-20  5:39                     ` Ingo Molnar
2015-04-20 12:17                       ` Paul E. McKenney
2015-04-20 15:53                       ` Linus Torvalds
2015-04-20 15:41                   ` Rabin Vincent
2015-04-20 10:46                 ` Geert Uytterhoeven
2015-04-20 10:46                   ` Geert Uytterhoeven

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=5533B6D7.9050101@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulmck@us.ibm.com \
    --cc=peterz@infradead.org \
    --cc=rabin@rab.in \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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.