From: Peter Zijlstra <peterz@infradead.org>
To: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Cc: "linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
"linux-snps-arc@lists.infradead.org"
<linux-snps-arc@lists.infradead.org>,
Alexey Brodkin <Alexey.Brodkin@synopsys.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Do we need to disable preemption in flush_tlb_range()?
Date: Thu, 15 Mar 2018 09:27:21 +0100 [thread overview]
Message-ID: <20180315082720.GT4064@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <5a5c67c1-9f45-f908-2c8d-0914cd616a18@synopsys.com>
On Wed, Mar 14, 2018 at 01:19:01PM -0700, Vineet Gupta wrote:
> +CC Peter since we have his attention ;-)
Yeah, timezone collision there, I typically sleep at 1am ;-)
> On 03/01/2018 07:13 AM, Alexey Brodkin wrote:
> > Hi Vineet,
> >
> > Just noticed that in comments for smp_call_function_many() it is said that
> > preemption must be disabled during its execution. And that function gets executed
> > among other ways like that:
> > -------------------------->8-----------------------
> > flush_tlb_range()
> > -> on_each_cpu_mask()
> > -> smp_call_function_many()
> > -------------------------->8-----------------------
>
> In general I prefer not to - Peter what say you ?
The comment with smp_call_function_many() is correct, it relies on
preemption being disabled in a number of ways. I would expect
this_cpu_ptr() for example to complain when used with preemption
enabled (CONFIG_DEBUG_PREEMPT).
WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <peterz@infradead.org>
To: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-snps-arc@lists.infradead.org"
<linux-snps-arc@lists.infradead.org>
Subject: Re: Do we need to disable preemption in flush_tlb_range()?
Date: Thu, 15 Mar 2018 09:27:21 +0100 [thread overview]
Message-ID: <20180315082720.GT4064@hirez.programming.kicks-ass.net> (raw)
Message-ID: <20180315082721.8stUv1xYEfYNj-2HSoipjakl1A-1QELo0tHcOBj1Vz8@z> (raw)
In-Reply-To: <5a5c67c1-9f45-f908-2c8d-0914cd616a18@synopsys.com>
On Wed, Mar 14, 2018 at 01:19:01PM -0700, Vineet Gupta wrote:
> +CC Peter since we have his attention ;-)
Yeah, timezone collision there, I typically sleep at 1am ;-)
> On 03/01/2018 07:13 AM, Alexey Brodkin wrote:
> > Hi Vineet,
> >
> > Just noticed that in comments for smp_call_function_many() it is said that
> > preemption must be disabled during its execution. And that function gets executed
> > among other ways like that:
> > -------------------------->8-----------------------
> > flush_tlb_range()
> > -> on_each_cpu_mask()
> > -> smp_call_function_many()
> > -------------------------->8-----------------------
>
> In general I prefer not to - Peter what say you ?
The comment with smp_call_function_many() is correct, it relies on
preemption being disabled in a number of ways. I would expect
this_cpu_ptr() for example to complain when used with preemption
enabled (CONFIG_DEBUG_PREEMPT).
next prev parent reply other threads:[~2018-03-15 8:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-01 15:13 Do we need to disable preemption in flush_tlb_range()? Alexey Brodkin
2018-03-01 15:13 ` Alexey Brodkin
2018-03-14 19:15 ` Alexey Brodkin
2018-03-14 19:15 ` Alexey Brodkin
2018-03-14 20:19 ` Vineet Gupta
2018-03-14 20:19 ` Vineet Gupta
2018-03-15 8:27 ` Peter Zijlstra [this message]
2018-03-15 8:27 ` Peter Zijlstra
2018-03-15 9:39 ` Alexey Brodkin
2018-03-15 9:39 ` Alexey Brodkin
2018-03-15 17:32 ` Vineet Gupta
2018-03-15 17:32 ` Vineet Gupta
2018-03-16 10:11 ` Peter Zijlstra
2018-03-16 10:11 ` Peter Zijlstra
2018-03-16 15:01 ` Alexey Brodkin
2018-03-16 15:01 ` Alexey Brodkin
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=20180315082720.GT4064@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=Alexey.Brodkin@synopsys.com \
--cc=Vineet.Gupta1@synopsys.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.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