From: Chunyan Zhang <zhang.chunyan@linaro.org> To: Will Deacon <will.deacon@arm.com> Cc: Steven Rostedt <rostedt@goodmis.org>, mingo@redhat.com, Mark Yang <mark.yang@spreadtrum.com>, Lyra Zhang <zhang.lyra@gmail.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, Takahiro Akashi <takahiro.akashi@linaro.org>, Catalin Marinas <catalin.marinas@arm.com> Subject: Re: [PATCH] arm64: use preempt_disable_notrace in _percpu_read/write Date: Fri, 9 Sep 2016 19:43:36 +0800 [thread overview] Message-ID: <CAG2=9p-jc8fY2YEcLNusb0uYXMkKzMByYJ1PvdthNCp7UEtPKg@mail.gmail.com> (raw) In-Reply-To: <20160909100732.GD20192@arm.com> On 9 September 2016 at 18:07, Will Deacon <will.deacon@arm.com> wrote: > 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/)? Yes, I will send out another patch to fix that. Thanks, Chunyan > > Will
WARNING: multiple messages have this Message-ID (diff)
From: zhang.chunyan@linaro.org (Chunyan Zhang) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm64: use preempt_disable_notrace in _percpu_read/write Date: Fri, 9 Sep 2016 19:43:36 +0800 [thread overview] Message-ID: <CAG2=9p-jc8fY2YEcLNusb0uYXMkKzMByYJ1PvdthNCp7UEtPKg@mail.gmail.com> (raw) In-Reply-To: <20160909100732.GD20192@arm.com> On 9 September 2016 at 18:07, Will Deacon <will.deacon@arm.com> wrote: > 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/)? Yes, I will send out another patch to fix that. Thanks, Chunyan > > Will
next prev parent reply other threads:[~2016-09-09 11:43 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 2016-09-09 10:07 ` Will Deacon 2016-09-09 11:43 ` Chunyan Zhang [this message] 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='CAG2=9p-jc8fY2YEcLNusb0uYXMkKzMByYJ1PvdthNCp7UEtPKg@mail.gmail.com' \ --to=zhang.chunyan@linaro.org \ --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=will.deacon@arm.com \ --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: linkBe 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.