Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1484851

Re: [PATCH] percpu: make this_cpu_generic_read notrace

From Will Deacon <will.deacon@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH] percpu: make this_cpu_generic_read notrace
Date 2016-09-16 12:00 +0200
Message-ID <shY65-2Wu-5@gated-at.bofh.it> (permalink)
References <sfM93-6px-5@gated-at.bofh.it> <shX0m-2jc-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Sep 16, 2016 at 04:42:44PM +0800, Chunyan Zhang wrote:
> Hi Will and Steven,
> 
> May I have a review or an acked-by from you on this patch so that Arnd
> can pick it up.
> 
> I have tested this patch on arm qemu, I'm sure it can solve the
> problem described in commit message.

It looks fine to me; we took your equivalent patch for arm64 already, so:

Acked-by: Will Deacon <will.deacon@arm.com>

Will

> On 10 September 2016 at 16:45, Chunyan Zhang <zhang.chunyan@linaro.org> wrote:
> > When debug preempt or preempt tracer is enabled, preempt_count_add/sub()
> > can be traced by function and function graph tracing, and
> > preempt_disable/enable() would call preempt_count_add/sub(), so
> > we should use preempt_disable/enable_notrace in Ftrace subsystem.
> >
> > The function this_cpu_read() started being used by function graph tracing
> > after the commit 345ddcc882d8 ("ftrace: Have set_ftrace_pid use the
> > bitmap like events do"), so it has to use preempt_disable/enable_notrace
> > instead now.
> >
> > Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
> > ---
> >  include/asm-generic/percpu.h | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h
> > index 4d9f233..70fefec 100644
> > --- a/include/asm-generic/percpu.h
> > +++ b/include/asm-generic/percpu.h
> > @@ -108,9 +108,9 @@ do {                                                                        \
> >  #define this_cpu_generic_read(pcp)                                     \
> >  ({                                                                     \
> >         typeof(pcp) __ret;                                              \
> > -       preempt_disable();                                              \
> > +       preempt_disable_notrace();                                      \
> >         __ret = *this_cpu_ptr(&(pcp));                                  \
> > -       preempt_enable();                                               \
> > +       preempt_enable_notrace();                                       \
> >         __ret;                                                          \
> >  })
> >
> > --
> > 2.7.4
> >
> 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] percpu: make this_cpu_generic_read notrace Chunyan Zhang <zhang.chunyan@linaro.org> - 2016-09-10 10:50 +0200
  Re: [PATCH] percpu: make this_cpu_generic_read notrace Chunyan Zhang <zhang.chunyan@linaro.org> - 2016-09-16 10:50 +0200
    Re: [PATCH] percpu: make this_cpu_generic_read notrace Will Deacon <will.deacon@arm.com> - 2016-09-16 12:00 +0200
      Re: [PATCH] percpu: make this_cpu_generic_read notrace Chunyan Zhang <zhang.chunyan@linaro.org> - 2016-09-16 12:10 +0200
      Re: [PATCH] percpu: make this_cpu_generic_read notrace Steven Rostedt <rostedt@goodmis.org> - 2016-09-16 15:30 +0200

csiph-web