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] Fix bug 515 by adding a global lock around the hotplug s

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix bug 515 by adding a global lock around the hotplug scripts in the non-udev hotplug case only.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 24 Mar 2006 17:52:07 +0000
Delivery-date: Fri, 24 Mar 2006 17:53:47 +0000
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/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 harry@xxxxxxxxxxxxxxxxxxxxx
# Node ID 74e33cc868cff29b68c7d629dc5ee7472221df51
# Parent  33df7d4eff23216241221e82f74f2cd96d67daa2
Fix bug 515 by adding a global lock around the hotplug scripts in the non-udev 
hotplug case only.

There are two possible root causes for 515, both of which are only problems in 
the non-udev hotplug case because udev uses udevsend which already implements 
the required serialisation.

1) Script concurrency.
2) Kernel reordering hotplug events.

This changeset fixes (1) but not (2).  Since (1) is the problem that seems to 
be happening this is probably OK.

A fix for (2) for the hotplug case might be to add extra serialisation using 
state changes in the store but this would impact all the drivers and the code 
and extra complexity would be redundant once everyone had moved to udev.  This 
doesn't seem worthwhile unless we actually start to see (2) happening.

diff -r 33df7d4eff23 -r 74e33cc868cf tools/examples/xen-backend.agent
--- a/tools/examples/xen-backend.agent  Fri Mar 24 13:31:12 2006
+++ b/tools/examples/xen-backend.agent  Fri Mar 24 13:31:20 2006
@@ -1,6 +1,10 @@
 #! /bin/sh
 
 PATH=/etc/xen/scripts:$PATH
+
+. /etc/xen/scripts/locking.sh
+
+claim_lock xenbus_hotplug_global
 
 case "$XENBUS_TYPE" in
   vbd)
@@ -25,3 +29,5 @@
   offline)
     ;;
 esac
+
+release_lock xenbus_hotplug_global

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix bug 515 by adding a global lock around the hotplug scripts in the non-udev hotplug case only., Xen patchbot -unstable <=