public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Boqun Feng <boqun.feng@gmail.com>, Andrew Hunter <ahh@google.com>,
	maged michael <maged.michael@gmail.com>,
	Avi Kivity <avi@scylladb.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Dave Watson <davejwatson@fb.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Andrea Parri <parri.andrea@gmail.com>,
	stable <stable@vger.kernel.org>
Subject: Re: [PATCH] Fix: membarrier: add missing preempt off around smp_call_function_many
Date: Tue, 9 Jan 2018 23:14:08 +0000 (UTC)	[thread overview]
Message-ID: <412597024.50114.1515539648032.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <1396790368.40028.1513782176011.JavaMail.zimbra@efficios.com>

Hi Linus,

Can you pick up this straightforward fix please ? Let me know whether
I need to re-send the patch if for some reason the original post is
too far back in your inbox.

Thanks,

Mathieu

----- On Dec 20, 2017, at 10:02 AM, Mathieu Desnoyers mathieu.desnoyers@efficios.com wrote:

> Hi Linus, Peter, Ingo,
> 
> Now that membarrier.c has been moved from kernel/ to kernel/sched/, should
> I route this membarrier fix through the scheduler maintainers, or is it OK
> to send it to you directly ?
> 
> Thanks,
> 
> Mathieu
> 
> ----- On Dec 15, 2017, at 2:23 PM, Mathieu Desnoyers
> mathieu.desnoyers@efficios.com wrote:
> 
>> smp_call_function_many requires disabling preemption around the call.
>> 
>> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
>> CC: Linus Torvalds <torvalds@linux-foundation.org>
>> CC: Peter Zijlstra <peterz@infradead.org>
>> CC: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
>> CC: Boqun Feng <boqun.feng@gmail.com>
>> CC: Andrew Hunter <ahh@google.com>
>> CC: Maged Michael <maged.michael@gmail.com>
>> CC: Avi Kivity <avi@scylladb.com>
>> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>> CC: Paul Mackerras <paulus@samba.org>
>> CC: Michael Ellerman <mpe@ellerman.id.au>
>> CC: Dave Watson <davejwatson@fb.com>
>> CC: Thomas Gleixner <tglx@linutronix.de>
>> CC: Ingo Molnar <mingo@redhat.com>
>> CC: "H. Peter Anvin" <hpa@zytor.com>
>> CC: Andrea Parri <parri.andrea@gmail.com>
>> CC: <stable@vger.kernel.org>	# v4.14
>> ---
>> kernel/sched/membarrier.c | 2 ++
>> 1 file changed, 2 insertions(+)
>> 
>> diff --git a/kernel/sched/membarrier.c b/kernel/sched/membarrier.c
>> index dd7908743dab..9bcbacba82a8 100644
>> --- a/kernel/sched/membarrier.c
>> +++ b/kernel/sched/membarrier.c
>> @@ -89,7 +89,9 @@ static int membarrier_private_expedited(void)
>> 		rcu_read_unlock();
>> 	}
>> 	if (!fallback) {
>> +		preempt_disable();
>> 		smp_call_function_many(tmpmask, ipi_mb, NULL, 1);
>> +		preempt_enable();
>> 		free_cpumask_var(tmpmask);
>> 	}
>> 	cpus_read_unlock();
>> --
>> 2.11.0
> 
> --
> Mathieu Desnoyers
> EfficiOS Inc.
> http://www.efficios.com

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

  reply	other threads:[~2018-01-09 23:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-15 19:23 [PATCH] Fix: membarrier: add missing preempt off around smp_call_function_many Mathieu Desnoyers
2017-12-20 15:02 ` Mathieu Desnoyers
2018-01-09 23:14   ` Mathieu Desnoyers [this message]
2018-01-10  7:43     ` Ingo Molnar
2018-01-10  7:54 ` [tip:sched/urgent] membarrier: Disable preemption when calling smp_call_function_many() tip-bot for Mathieu Desnoyers

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=412597024.50114.1515539648032.JavaMail.zimbra@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    --cc=ahh@google.com \
    --cc=avi@scylladb.com \
    --cc=benh@kernel.crashing.org \
    --cc=boqun.feng@gmail.com \
    --cc=davejwatson@fb.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maged.michael@gmail.com \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=parri.andrea@gmail.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=stable@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox