21317-xend-blkif-util-tap2.patch suse-disable-tap2-default.patch - Match upstreams cpu pools switch from domctl to sysctl - Upstream replacements for two of our custom patches (to ease applying further backports) - Fixed dump-exec-state.patch (could previously hang the system, as could - with lower probability - the un-patched implementation) - bnc#593536 - xen hypervisor takes very long to initialize Dom0 on 128 CPUs and 256Gb 21272-x86-dom0-alloc-performance.patch 21266-vmx-disabled-check.patch 21271-x86-cache-flush-global.patch - bnc#558815 - using multiple npiv luns with same wwpn/wwnn broken - bnc#601104 - Xen /etc/xen/scripts/block-npiv script fails when accessing multiple disks using NPIV block-npiv - bnc#595124 - VT-d can not be enabled on 32PAE Xen on Nehalem-EX platform 21234-x86-bad-srat-clear-pxm2node.patch bnc#585371 - kdump fails to load with xen: locate_hole failed 21235-crashkernel-advanced.patch - bnc#588918 - Attaching a U-disk to domain's failed by "xm usb-attach" init.xend OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=44
98 lines
2.9 KiB
Diff
98 lines
2.9 KiB
Diff
# HG changeset patch
|
|
# User Keir Fraser <keir.fraser@citrix.com>
|
|
# Date 1273143595 -3600
|
|
# Node ID ccae861f52f7f25aa2ab404a6110831402845dac
|
|
# Parent 924f54145fda26df64bf6f57010793893b29866f
|
|
Reduce '0' debug key's global impact
|
|
|
|
On large systems, dumping state may cause time management to get
|
|
stalled for so long a period that it wouldn't recover. Therefore add
|
|
a tasklet-based alternative mechanism to handle Dom0 state dumps.
|
|
|
|
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
|
|
|
--- a/xen/common/keyhandler.c
|
|
+++ b/xen/common/keyhandler.c
|
|
@@ -19,6 +19,7 @@
|
|
|
|
static struct keyhandler *key_table[256];
|
|
static unsigned char keypress_key;
|
|
+static bool_t alt_key_handling;
|
|
|
|
char keyhandler_scratch[1024];
|
|
|
|
@@ -115,6 +116,26 @@ static struct keyhandler dump_registers_
|
|
.desc = "dump registers"
|
|
};
|
|
|
|
+static DECLARE_TASKLET(dump_dom0_tasklet, NULL, 0);
|
|
+
|
|
+static void dump_dom0_action(unsigned long arg)
|
|
+{
|
|
+ struct vcpu *v = (void *)arg;
|
|
+
|
|
+ for ( ; ; )
|
|
+ {
|
|
+ vcpu_show_execution_state(v);
|
|
+ if ( (v = v->next_in_list) == NULL )
|
|
+ break;
|
|
+ if ( softirq_pending(smp_processor_id()) )
|
|
+ {
|
|
+ dump_dom0_tasklet.data = (unsigned long)v;
|
|
+ tasklet_schedule_on_cpu(&dump_dom0_tasklet, v->processor);
|
|
+ break;
|
|
+ }
|
|
+ }
|
|
+}
|
|
+
|
|
static void dump_dom0_registers(unsigned char key)
|
|
{
|
|
struct vcpu *v;
|
|
@@ -125,7 +146,17 @@ static void dump_dom0_registers(unsigned
|
|
printk("'%c' pressed -> dumping Dom0's registers\n", key);
|
|
|
|
for_each_vcpu ( dom0, v )
|
|
+ {
|
|
+ if ( alt_key_handling && softirq_pending(smp_processor_id()) )
|
|
+ {
|
|
+ tasklet_kill(&dump_dom0_tasklet);
|
|
+ tasklet_init(&dump_dom0_tasklet, dump_dom0_action,
|
|
+ (unsigned long)v);
|
|
+ tasklet_schedule_on_cpu(&dump_dom0_tasklet, v->processor);
|
|
+ return;
|
|
+ }
|
|
vcpu_show_execution_state(v);
|
|
+ }
|
|
}
|
|
|
|
static struct keyhandler dump_dom0_registers_keyhandler = {
|
|
@@ -425,8 +456,28 @@ static struct keyhandler do_debug_key_ke
|
|
.desc = "trap to xendbg"
|
|
};
|
|
|
|
+static void do_toggle_alt_key(unsigned char key, struct cpu_user_regs *regs)
|
|
+{
|
|
+ alt_key_handling = !alt_key_handling;
|
|
+ printk("'%c' pressed -> using %s key handling\n", key,
|
|
+ alt_key_handling ? "alternative" : "normal");
|
|
+}
|
|
+
|
|
+static struct keyhandler toggle_alt_keyhandler = {
|
|
+ .irq_callback = 1,
|
|
+ .u.irq_fn = do_toggle_alt_key,
|
|
+ .desc = "toggle alternative key handling"
|
|
+};
|
|
+
|
|
void __init initialize_keytable(void)
|
|
{
|
|
+ if ( num_present_cpus() > 16 )
|
|
+ {
|
|
+ alt_key_handling = 1;
|
|
+ printk(XENLOG_INFO "Defaulting to alternative key handling; "
|
|
+ "send 'A' to switch to normal mode.\n");
|
|
+ }
|
|
+ register_keyhandler('A', &toggle_alt_keyhandler);
|
|
register_keyhandler('d', &dump_registers_keyhandler);
|
|
register_keyhandler('h', &show_handlers_keyhandler);
|
|
register_keyhandler('q', &dump_domains_keyhandler);
|