From: "Lan, Tianyu" <tianyu.lan@intel.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: sstabellini@kernel.org, wei.liu2@citrix.com,
George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
ian.jackson@eu.citrix.com, xen-devel@lists.xenproject.org
Subject: Re: [PATCH] Xen: Force non-irq keyhandler to be run in tasklet when receive a debugkey from serial port
Date: Mon, 24 Oct 2016 22:01:52 +0800 [thread overview]
Message-ID: <b446501a-e5e2-bf0e-562d-66a53bdd066a@intel.com> (raw)
In-Reply-To: <580E043E0200007800118EE8@prv-mh.provo.novell.com>
On 10/24/2016 6:53 PM, Jan Beulich wrote:
>>>> On 22.10.16 at 13:23, <tianyu.lan@intel.com> wrote:
>> __serial_rx() runs in either irq handler or timer handler and non-irq
>> keyhandler should not run in these contexts. So always force non-irq
>> keyhandler to run in tasklet when receive a debugkey from serial port
>>
>> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
>> ---
>> xen/drivers/char/console.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
>> index b0f74ce..184b523 100644
>> --- a/xen/drivers/char/console.c
>> +++ b/xen/drivers/char/console.c
>> @@ -347,7 +347,7 @@ static void switch_serial_input(void)
>> static void __serial_rx(char c, struct cpu_user_regs *regs)
>> {
>> if ( xen_rx )
>> - return handle_keypress(c, regs, !in_irq());
>> + return handle_keypress(c, regs, true);
>
> Together with one of your earlier patches having got reverted, I
> think we need to take a step back here instead of going back to
> what was requested to be changed from v2 of the original patch.
> In particular I assume that the problem you're trying to address is
> not limited to dump_timerq() - at least dump_runq() should be as
> problematic on many-CPU systems.
I think the issue here is that my previous patch commit
610b4eda2c("keyhandler: rework process of nonirq keyhandler") makes
non-irq keyhandler run in irq context. This is caused by input param
"!in_irq()" which is false in irq context. handle_keypress() runs
keyhandler synchronically. This patch fixes the issue.
>
> I think (and I vaguely recall possibly having said so during earlier
> review) that dump functions the output of which depends on CPU
> count should get modeled after dump_registers(), and it might be
> worth abstracting this in keyhandler.c.
Yes, but this sounds like a new feature or framework rework rather than
a fix patch.
> In any case quite likely the
> other patch of yours (which the one here basically modifies) may
> then also want to be reverted.
I think patch "timer: process softirq during dumping timer"
does right thing. The issue is triggered by previous patch.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-10-24 14:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-22 11:23 [PATCH] Xen: Force non-irq keyhandler to be run in tasklet when receive a debugkey from serial port Lan Tianyu
2016-10-24 0:19 ` Konrad Rzeszutek Wilk
2016-10-24 13:29 ` Lan, Tianyu
2016-10-24 13:38 ` Konrad Rzeszutek Wilk
2016-10-24 14:12 ` Lan, Tianyu
2016-10-24 14:29 ` Jan Beulich
2016-10-24 13:54 ` Jan Beulich
2016-10-24 14:15 ` Lan, Tianyu
2016-10-24 14:31 ` Jan Beulich
2016-10-24 14:43 ` Lan, Tianyu
2016-10-24 14:56 ` Konrad Rzeszutek Wilk
2016-10-24 14:58 ` Jan Beulich
2016-10-24 10:53 ` Jan Beulich
2016-10-24 11:26 ` Wei Liu
2016-10-24 14:01 ` Lan, Tianyu [this message]
2016-10-24 14:28 ` Jan Beulich
2016-10-24 15:03 ` Lan, Tianyu
2016-10-24 15:14 ` Jan Beulich
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=b446501a-e5e2-bf0e-562d-66a53bdd066a@intel.com \
--to=tianyu.lan@intel.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=sstabellini@kernel.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).