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


Groups > linux.kernel > #1479902

Re: [PATCH] arm64: use preempt_disable_notrace in _percpu_read/write

From Catalin Marinas <catalin.marinas@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH] arm64: use preempt_disable_notrace in _percpu_read/write
Date 2016-09-09 13:40 +0200
Message-ID <sfsk1-2dK-1@gated-at.bofh.it> (permalink)
References <sf6We-5Sk-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Sep 08, 2016 at 08:46:42PM +0800, Chunyan Zhang 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 in Ftrace
> subsystem we should use preempt_disable/enable_notrace instead.
> 
> In the commit 345ddcc882d8 ("ftrace: Have set_ftrace_pid use the bitmap
> like events do") the function this_cpu_read() was added to
> trace_graph_entry(), and if this_cpu_read() calls preempt_disable(), graph
> tracer will go into a recursive loop, even if the tracing_on is
> disabled.
> 
> So this patch change to use preempt_enable/disable_notrace instead in
> this_cpu_read().
> 
> Since Yonghui Yang helped a lot to find the root cause of this problem,
> so also add his SOB.
> 
> Signed-off-by: Yonghui Yang <mark.yang@spreadtrum.com>
> Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>

Queued for 4.8-rc6. Thanks.

-- 
Catalin

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


Thread

[PATCH] arm64: use preempt_disable_notrace in _percpu_read/write Chunyan Zhang <zhang.chunyan@linaro.org> - 2016-09-08 14:50 +0200
  Re: [PATCH] arm64: use preempt_disable_notrace in _percpu_read/write Mark Rutland <mark.rutland@arm.com> - 2016-09-08 15:10 +0200
    Re: [PATCH] arm64: use preempt_disable_notrace in _percpu_read/write Chunyan Zhang <zhang.lyra@gmail.com> - 2016-09-08 15:20 +0200
  Re: [PATCH] arm64: use preempt_disable_notrace in _percpu_read/write Will Deacon <will.deacon@arm.com> - 2016-09-09 12:10 +0200
    Re: [PATCH] arm64: use preempt_disable_notrace in _percpu_read/write Chunyan Zhang <zhang.chunyan@linaro.org> - 2016-09-09 13:50 +0200
  Re: [PATCH] arm64: use preempt_disable_notrace in _percpu_read/write Catalin Marinas <catalin.marinas@arm.com> - 2016-09-09 13:40 +0200

csiph-web