From: takahiro.akashi@linaro.org (AKASHI Takahiro)
To: linux-arm-kernel@lists.infradead.org
Subject: [RESEND PATCH] arm64: kgdb: fix single stepping
Date: Tue, 20 Sep 2016 17:43:14 +0900 [thread overview]
Message-ID: <20160920084312.GF30248@linaro.org> (raw)
In-Reply-To: <bb9cf2c6-83b4-1c71-d497-67f751de9b35@windriver.com>
Jason,
On Mon, Sep 19, 2016 at 05:29:36PM -0500, Jason Wessel wrote:
> On 09/15/2016 11:32 PM, AKASHI Takahiro wrote:
> >@@ -176,18 +183,14 @@ int kgdb_arch_handle_exception(int exception_vector, int signo,
> >>> * over and over again.
> >>> */
> >>> kgdb_arch_update_addr(linux_regs, remcom_in_buffer);
> >>>- atomic_set(&kgdb_cpu_doing_single_step, -1);
> >>>- kgdb_single_step = 0;
> >>
> >>This is a subtle change, but I assume it is what you intended? All the CPUs will get released into the run state when exiting the kgdb exception handler.
> >You are talking about "- kgdb_single_step = 0." Right?
>
>
> Correct.
>
> >Do you think that there is any (negative) side effect of this change?
>
>
> Not at all. The kernel debugger always skids to a stop, and it is more reliable from a locking perspective if the other CPU threads are released while a single CPU is asked to single step until the next "skid" for all the other CPUs.
>
> When you do not release the other CPUs you can end up single stepping a CPU which dead locks or never exits a lock elsewhere due to what ever it was blocking on never getting freed from another CPU.
Thank you for the explanation. This convinces me very much.
-Takahiro AKASHI
> Cheers,
> Jason.
WARNING: multiple messages have this Message-ID (diff)
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: Jason Wessel <jason.wessel@windriver.com>
Cc: catalin.marinas@arm.com, will.deacon@arm.com, broonie@kernel.org,
yong.zhao@amd.com, Vijaya.Kumar@caviumnetworks.com,
kgdb-bugreport@lists.sourceforge.net,
linux-arm-kernel@lists.infradead.org,
linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org
Subject: Re: [RESEND PATCH] arm64: kgdb: fix single stepping
Date: Tue, 20 Sep 2016 17:43:14 +0900 [thread overview]
Message-ID: <20160920084312.GF30248@linaro.org> (raw)
In-Reply-To: <bb9cf2c6-83b4-1c71-d497-67f751de9b35@windriver.com>
Jason,
On Mon, Sep 19, 2016 at 05:29:36PM -0500, Jason Wessel wrote:
> On 09/15/2016 11:32 PM, AKASHI Takahiro wrote:
> >@@ -176,18 +183,14 @@ int kgdb_arch_handle_exception(int exception_vector, int signo,
> >>> * over and over again.
> >>> */
> >>> kgdb_arch_update_addr(linux_regs, remcom_in_buffer);
> >>>- atomic_set(&kgdb_cpu_doing_single_step, -1);
> >>>- kgdb_single_step = 0;
> >>
> >>This is a subtle change, but I assume it is what you intended? All the CPUs will get released into the run state when exiting the kgdb exception handler.
> >You are talking about "- kgdb_single_step = 0." Right?
>
>
> Correct.
>
> >Do you think that there is any (negative) side effect of this change?
>
>
> Not at all. The kernel debugger always skids to a stop, and it is more reliable from a locking perspective if the other CPU threads are released while a single CPU is asked to single step until the next "skid" for all the other CPUs.
>
> When you do not release the other CPUs you can end up single stepping a CPU which dead locks or never exits a lock elsewhere due to what ever it was blocking on never getting freed from another CPU.
Thank you for the explanation. This convinces me very much.
-Takahiro AKASHI
> Cheers,
> Jason.
next prev parent reply other threads:[~2016-09-20 8:43 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-21 1:13 [RESEND PATCH] arm64: kgdb: fix single stepping AKASHI Takahiro
2015-04-21 1:13 ` AKASHI Takahiro
2016-09-14 12:48 ` Giuseppe CAVALLARO
2016-09-14 14:58 ` Will Deacon
2016-09-14 14:58 ` Will Deacon
2016-09-15 7:56 ` AKASHI Takahiro
2016-09-15 7:56 ` AKASHI Takahiro
2016-09-15 10:41 ` Daniel Thompson
2016-09-15 10:41 ` Daniel Thompson
2016-09-15 12:32 ` Jason Wessel
2016-09-15 12:32 ` Jason Wessel
2016-09-15 13:04 ` Jason Wessel
2016-09-15 13:04 ` Jason Wessel
2016-09-16 4:32 ` AKASHI Takahiro
2016-09-16 4:32 ` AKASHI Takahiro
2016-09-16 7:45 ` Will Deacon
2016-09-16 7:45 ` Will Deacon
2016-09-19 22:25 ` Jason Wessel
2016-09-19 22:25 ` Jason Wessel
2016-09-19 22:29 ` Jason Wessel
2016-09-19 22:29 ` Jason Wessel
2016-09-20 8:43 ` AKASHI Takahiro [this message]
2016-09-20 8:43 ` AKASHI Takahiro
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=20160920084312.GF30248@linaro.org \
--to=takahiro.akashi@linaro.org \
--cc=linux-arm-kernel@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 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.