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-devel

[Xen-devel] [PATCH 1/2] reap the blktapctl thread and notify the tapdisk

To: <ian.jackson@xxxxxxxxxxxxx>,<xen-devel@xxxxxxxxxxxxxxxxxxx>, "Jim Fehlig" <JFEHLIG@xxxxxxxxxx>
Subject: [Xen-devel] [PATCH 1/2] reap the blktapctl thread and notify the tapdisk backend driver to release resource like memory..
From: "James Song" <jsong@xxxxxxxxxx>
Date: Tue, 04 May 2010 21:11:44 -0600
Cc:
Delivery-date: Tue, 04 May 2010 20:12:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,
 
For this issue I had initial discussion thread before, more detail, please see :
http://lists.xensource.com/archives/html/xen-devel/2010-04/msg01140.html.
 
I write a new patch for this issue, which modified qemu code.  So Ian, could you take a look this patch,too.
 
thanks,
James (Song Wei)
 
Signed-off-by: James ( Song Wei ) <jsong@xxxxxxxxxx>
 
diff -r efa1b905d893 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Tue May 04 13:59:55 2010 +0100
+++ b/tools/python/xen/xend/image.py    Wed May 05 10:46:52 2010 +0800
@@ -629,30 +629,6 @@
                     os.kill(self.pid, signal.SIGHUP)
                 except OSError, exn:
                     log.exception(exn)
-                # Try to reap the child every 100ms for 10s. Then SIGKILL it.
-                for i in xrange(100):
-                    try:
-                        (p, rv) = os.waitpid(self.pid, os.WNOHANG)
-                        if p == self.pid:
-                            break
-                    except OSError:
-                        # This is expected if Xend has been restarted within
-                        # the life of this domain.  In this case, we can kill
-                        # the process, but we can't wait for it because it's
-                        # not our child. We continue this loop, and after it is
-                        # terminated make really sure the process is going away
-                        # (SIGKILL).
-                        pass
-                    time.sleep(0.1)
-                else:
-                    log.warning("DeviceModel %d took more than 10s "
-                                "to terminate: sending SIGKILL" % self.pid)
-                    try:
-                        os.kill(self.pid, signal.SIGKILL)
-                        os.waitpid(self.pid, 0)
-                    except OSError:
-                        # This happens if the process doesn't exist.
-                        pass
         finally:
             self.pid = None
             self.sentinel_lock.release()
 
 
thanks,
-James (Song Wei)
 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>