From: Jason Wessel <jason.wessel@windriver.com>
To: AKASHI Takahiro <takahiro.akashi@linaro.org>,
<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: Mon, 19 Sep 2016 17:29:36 -0500 [thread overview]
Message-ID: <bb9cf2c6-83b4-1c71-d497-67f751de9b35@windriver.com> (raw)
In-Reply-To: <20160916043218.GA30248@linaro.org>
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.
Cheers,
Jason.
next prev parent reply other threads:[~2016-09-19 22:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-21 1:13 AKASHI Takahiro
2016-09-14 14:58 ` Will Deacon
2016-09-15 7:56 ` AKASHI Takahiro
2016-09-15 10:41 ` Daniel Thompson
2016-09-15 12:32 ` Jason Wessel
2016-09-15 13:04 ` Jason Wessel
2016-09-16 4:32 ` AKASHI Takahiro
2016-09-16 7:45 ` Will Deacon
2016-09-19 22:25 ` Jason Wessel
2016-09-19 22:29 ` Jason Wessel [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=bb9cf2c6-83b4-1c71-d497-67f751de9b35@windriver.com \
--to=jason.wessel@windriver.com \
--cc=Vijaya.Kumar@caviumnetworks.com \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=takahiro.akashi@linaro.org \
--cc=will.deacon@arm.com \
--cc=yong.zhao@amd.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®