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-unstable] Do not deadlock in scheduler when sending

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Do not deadlock in scheduler when sending VIRQ_CON_RING.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 07 Mar 2009 06:35:19 -0800
Delivery-date: Sat, 07 Mar 2009 06:35:40 -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.fraser@xxxxxxxxxx>
# Date 1236349707 0
# Node ID 3fd8f9b349413c5a04d0e3f93e43463f1021c9dc
# Parent  cff29d694a8905e94dfe7506ca1e3482c2c8a76b
Do not deadlock in scheduler when sending VIRQ_CON_RING.
Instead defer the virq notification to tasklet context.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/drivers/char/console.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff -r cff29d694a89 -r 3fd8f9b34941 xen/drivers/char/console.c
--- a/xen/drivers/char/console.c        Thu Mar 05 17:50:05 2009 +0000
+++ b/xen/drivers/char/console.c        Fri Mar 06 14:28:27 2009 +0000
@@ -315,6 +315,12 @@ static void serial_rx(char c, struct cpu
     __serial_rx(c, regs);
 }
 
+static void notify_dom0_con_ring(unsigned long unused)
+{
+    send_guest_global_virq(dom0, VIRQ_CON_RING);
+}
+static DECLARE_TASKLET(notify_dom0_con_ring_tasklet, notify_dom0_con_ring, 0);
+
 static long guest_console_write(XEN_GUEST_HANDLE(char) buffer, int count)
 {
     char kbuf[128], *kptr;
@@ -348,7 +354,7 @@ static long guest_console_write(XEN_GUES
         {
             for ( kptr = kbuf; *kptr != '\0'; kptr++ )
                 putchar_console_ring(*kptr);
-            send_guest_global_virq(dom0, VIRQ_CON_RING);
+            tasklet_schedule(&notify_dom0_con_ring_tasklet);
         }
 
         spin_unlock_irq(&console_lock);
@@ -426,7 +432,7 @@ static void __putstr(const char *str)
     while ( (c = *str++) != '\0' )
         putchar_console_ring(c);
 
-    send_guest_global_virq(dom0, VIRQ_CON_RING);
+    tasklet_schedule(&notify_dom0_con_ring_tasklet);
 }
 
 static int printk_prefix_check(char *p, char **pp)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Do not deadlock in scheduler when sending VIRQ_CON_RING., Xen patchbot-unstable <=