WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-4.0-testing] Reduce side effects of handling '*' de

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.0-testing] Reduce side effects of handling '*' debug key
From: "Xen patchbot-4.0-testing" <patchbot-4.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 23 Dec 2010 11:35:19 -0800
Delivery-date: Thu, 23 Dec 2010 11:36:43 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1292414816 0
# Node ID 1bec63e5bcfe06af2f04d00a663df14ce53a9718
# Parent  ae381a864b4f38edf0c672160091b612346c88d1
Reduce side effects of handling '*' debug key

NMI watchdog should be suppressed when dumping IRQ handlers. Softirqs
should be handled periodically while processing non-IRQ handlers.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
xen-unstable changeset:   22538:a3a29e67aa7e
xen-unstable date:        Wed Dec 15 12:04:34 2010 +0000
---
 xen/common/keyhandler.c   |    9 +++++----
 xen/common/softirq.c      |   10 ++++++++++
 xen/include/xen/softirq.h |    2 ++
 3 files changed, 17 insertions(+), 4 deletions(-)

diff -r ae381a864b4f -r 1bec63e5bcfe xen/common/keyhandler.c
--- a/xen/common/keyhandler.c   Wed Dec 15 10:47:52 2010 +0000
+++ b/xen/common/keyhandler.c   Wed Dec 15 12:06:56 2010 +0000
@@ -375,16 +375,15 @@ static void run_all_nonirq_keyhandlers(u
     struct keyhandler *h;
     int k;
 
-    console_start_log_everything();
     for ( k = 0; k < ARRAY_SIZE(key_table); k++ )
     {
+        process_pending_softirqs_nested();
         h = key_table[k];
         if ( (h == NULL) || !h->diagnostic || h->irq_callback )
             continue;
         printk("[%c: %s]\n", k, h->desc);
         (*h->u.fn)(k);
     }
-    console_end_log_everything();
 }
 
 static DECLARE_TASKLET(run_all_keyhandlers_tasklet,
@@ -395,10 +394,11 @@ static void run_all_keyhandlers(unsigned
     struct keyhandler *h;
     int k;
 
+    watchdog_disable();
+
     printk("'%c' pressed -> firing all diagnostic keyhandlers\n", key);
 
     /* Fire all the IRQ-context diangostic keyhandlers now */
-    console_start_log_everything();
     for ( k = 0; k < ARRAY_SIZE(key_table); k++ )
     {
         h = key_table[k];
@@ -407,7 +407,8 @@ static void run_all_keyhandlers(unsigned
         printk("[%c: %s]\n", k, h->desc);
         (*h->u.irq_fn)(k, regs);
     }
-    console_end_log_everything();
+
+    watchdog_enable();
 
     /* Trigger the others from a tasklet in non-IRQ context */
     tasklet_schedule(&run_all_keyhandlers_tasklet);
diff -r ae381a864b4f -r 1bec63e5bcfe xen/common/softirq.c
--- a/xen/common/softirq.c      Wed Dec 15 10:47:52 2010 +0000
+++ b/xen/common/softirq.c      Wed Dec 15 12:06:56 2010 +0000
@@ -54,6 +54,16 @@ void process_pending_softirqs(void)
     __do_softirq(1ul<<SCHEDULE_SOFTIRQ);
 }
 
+void process_pending_softirqs_nested(void)
+{
+    ASSERT(!in_irq() && local_irq_is_enabled());
+    /*
+     * Do not enter scheduler as it can preempt the calling context,
+     * and do not run tasklets as we're running one currently.
+     */
+    __do_softirq((1ul<<SCHEDULE_SOFTIRQ) | (1ul<<TASKLET_SOFTIRQ));
+}
+
 asmlinkage void do_softirq(void)
 {
     __do_softirq(0);
diff -r ae381a864b4f -r 1bec63e5bcfe xen/include/xen/softirq.h
--- a/xen/include/xen/softirq.h Wed Dec 15 10:47:52 2010 +0000
+++ b/xen/include/xen/softirq.h Wed Dec 15 12:06:56 2010 +0000
@@ -39,6 +39,8 @@ void raise_softirq(unsigned int nr);
  * Use this instead of do_softirq() when you do not want to be preempted.
  */
 void process_pending_softirqs(void);
+/* ... and use this instead when running inside a tasklet. */
+void process_pending_softirqs_nested(void);
 
 /*
  * TASKLETS -- dynamically-allocatable tasks run in softirq context

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.0-testing] Reduce side effects of handling '*' debug key, Xen patchbot-4.0-testing <=