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] [linux-2.6.18-xen] Kernel threads need to be aware of fr

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] Kernel threads need to be aware of freeze request, by checking in
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 14 Jun 2007 13:00:22 -0700
Delivery-date: Thu, 14 Jun 2007 15:25:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1181573766 -3600
# Node ID c09686d2bbffa5ec2152f685df0eaa090ddddd83
# Parent  07a5f92187ac57ffbd107571b2019be2f53bda98
Kernel threads need to be aware of freeze request, by checking in
their main loop.

xenbus/xenwatch threads are special with PF_NOFREEZE, since we're sure
that they do nothing to block other native device drivers.

Signed-off-by Ke Yu <ke.yu@xxxxxxxxx>
Signed-off-by Kevin Tian <kevin.tian@xxxxxxxxx>
---
 drivers/xen/blkback/blkback.c  |    3 +++
 drivers/xen/xenbus/xenbus_xs.c |    2 ++
 2 files changed, 5 insertions(+)

diff -r 07a5f92187ac -r c09686d2bbff drivers/xen/blkback/blkback.c
--- a/drivers/xen/blkback/blkback.c     Mon Jun 11 15:53:26 2007 +0100
+++ b/drivers/xen/blkback/blkback.c     Mon Jun 11 15:56:06 2007 +0100
@@ -208,6 +208,9 @@ int blkif_schedule(void *arg)
                printk(KERN_DEBUG "%s: started\n", current->comm);
 
        while (!kthread_should_stop()) {
+               if(try_to_freeze())
+                       continue;
+            
                wait_event_interruptible(
                        blkif->wq,
                        blkif->waiting_reqs || kthread_should_stop());
diff -r 07a5f92187ac -r c09686d2bbff drivers/xen/xenbus/xenbus_xs.c
--- a/drivers/xen/xenbus/xenbus_xs.c    Mon Jun 11 15:53:26 2007 +0100
+++ b/drivers/xen/xenbus/xenbus_xs.c    Mon Jun 11 15:56:06 2007 +0100
@@ -718,6 +718,7 @@ static int xenwatch_thread(void *unused)
        struct list_head *ent;
        struct xs_stored_msg *msg;
 
+       current->flags |= PF_NOFREEZE;
        for (;;) {
                wait_event_interruptible(watch_events_waitq,
                                         !list_empty(&watch_events));
@@ -836,6 +837,7 @@ static int xenbus_thread(void *unused)
 {
        int err;
 
+       current->flags |= PF_NOFREEZE;
        for (;;) {
                err = process_msg();
                if (err)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] Kernel threads need to be aware of freeze request, by checking in, Xen patchbot-linux-2.6.18-xen <=