From: Lan Tianyu <tianyu.lan@intel.com>
To: xen-devel@lists.xenproject.org, xen-devel@lists.xen.org
Cc: Lan Tianyu <tianyu.lan@intel.com>,
sstabellini@kernel.org, wei.liu2@citrix.com,
George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
ian.jackson@eu.citrix.com, jbeulich@suse.com
Subject: [Resend PATCH 1/2] Xen/Keyhandler: Make keyhandler always run in tasklet
Date: Fri, 30 Sep 2016 10:19:05 +0800 [thread overview]
Message-ID: <1475201946-31898-2-git-send-email-tianyu.lan@intel.com> (raw)
In-Reply-To: <1475201946-31898-1-git-send-email-tianyu.lan@intel.com>
Keyhandler may run for a long time in a timer handler on the large machine
with a lot of physical cpus(E,G keyhandler for dumping timer info) when serial
port driver works in the poll mode. When timer interrupt arrives, timer subsystem
runs all timer handlers before programming next timer interrupt. So if timer handler
runs longer than time for watchdog timeout, the timer handler of watchdog will be
blocked to feed watchdog and xen hypervisor panics. This patch is to fix the issue
via always scheduling a tasklet to run keyhandler to avoid timer handler running
too long.
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
---
xen/common/keyhandler.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c
index 16de6e8..fce52d2 100644
--- a/xen/common/keyhandler.c
+++ b/xen/common/keyhandler.c
@@ -75,7 +75,9 @@ static struct keyhandler {
static void keypress_action(unsigned long unused)
{
- handle_keypress(keypress_key, NULL);
+ console_start_log_everything();
+ key_table[keypress_key].fn(keypress_key);
+ console_end_log_everything();
}
static DECLARE_TASKLET(keypress_tasklet, keypress_action, 0);
@@ -87,10 +89,10 @@ void handle_keypress(unsigned char key, struct cpu_user_regs *regs)
if ( key >= ARRAY_SIZE(key_table) || !(h = &key_table[key])->fn )
return;
- if ( !in_irq() || h->irq_callback )
+ if ( h->irq_callback )
{
console_start_log_everything();
- h->irq_callback ? h->irq_fn(key, regs) : h->fn(key);
+ h->irq_fn(key, regs);
console_end_log_everything();
}
else
--
1.7.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-09-30 2:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-30 2:19 [Resend PATCH 0/2] Xen: Fix Xen hypervisor panic during dumping timer info on huge machine Lan Tianyu
2016-09-30 2:19 ` Lan Tianyu [this message]
2016-09-30 18:07 ` [Resend PATCH 1/2] Xen/Keyhandler: Make keyhandler always run in tasklet Konrad Rzeszutek Wilk
2016-10-08 3:17 ` Lan Tianyu
2016-10-06 12:52 ` Jan Beulich
2016-10-08 3:26 ` Lan Tianyu
2016-10-10 6:48 ` Jan Beulich
2016-10-10 13:55 ` Konrad Rzeszutek Wilk
2016-10-11 1:42 ` Lan Tianyu
2016-09-30 2:19 ` [Resend PATCH 2/2] Xen/timer: Process softirq during dumping timer info Lan Tianyu
2016-09-30 18:11 ` Konrad Rzeszutek Wilk
2016-10-06 12:56 ` Jan Beulich
2016-10-08 5:28 ` Lan Tianyu
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=1475201946-31898-2-git-send-email-tianyu.lan@intel.com \
--to=tianyu.lan@intel.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=sstabellini@kernel.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
--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).