All of lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: Chunyan Zhang <zhang.chunyan@linaro.org>
Cc: rostedt@goodmis.org, mingo@redhat.com, mark.yang@spreadtrum.com,
	zhang.lyra@gmail.com, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, takahiro.akashi@linaro.org,
	catalin.marinas@arm.com
Subject: Re: [PATCH] arm64: use preempt_disable_notrace in _percpu_read/write
Date: Fri, 9 Sep 2016 11:07:33 +0100	[thread overview]
Message-ID: <20160909100732.GD20192@arm.com> (raw)
In-Reply-To: <1473338802-18712-1-git-send-email-zhang.chunyan@linaro.org>

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>
> ---
>  arch/arm64/include/asm/percpu.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Looks good to me:

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

However, don't you need to make a similar change to asm-generic/percpu.h
for other architectures (e.g. arch/arm/)?

Will

WARNING: multiple messages have this Message-ID (diff)
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: use preempt_disable_notrace in _percpu_read/write
Date: Fri, 9 Sep 2016 11:07:33 +0100	[thread overview]
Message-ID: <20160909100732.GD20192@arm.com> (raw)
In-Reply-To: <1473338802-18712-1-git-send-email-zhang.chunyan@linaro.org>

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>
> ---
>  arch/arm64/include/asm/percpu.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Looks good to me:

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

However, don't you need to make a similar change to asm-generic/percpu.h
for other architectures (e.g. arch/arm/)?

Will

  parent reply	other threads:[~2016-09-09 10:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-08 12:46 [PATCH] arm64: use preempt_disable_notrace in _percpu_read/write Chunyan Zhang
2016-09-08 12:46 ` Chunyan Zhang
2016-09-08 13:02 ` Mark Rutland
2016-09-08 13:02   ` Mark Rutland
2016-09-08 13:17   ` Chunyan Zhang
2016-09-08 13:17     ` Chunyan Zhang
2016-09-09 10:07 ` Will Deacon [this message]
2016-09-09 10:07   ` Will Deacon
2016-09-09 11:43   ` Chunyan Zhang
2016-09-09 11:43     ` Chunyan Zhang
2016-09-09 11:35 ` Catalin Marinas
2016-09-09 11:35   ` Catalin Marinas
  -- strict thread matches above, loose matches on Subject: below --
2016-09-08 12:45 Chunyan Zhang

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=20160909100732.GD20192@arm.com \
    --to=will.deacon@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.yang@spreadtrum.com \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=takahiro.akashi@linaro.org \
    --cc=zhang.chunyan@linaro.org \
    --cc=zhang.lyra@gmail.com \
    /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.