xen hotplug scripts crazy performance changes

Bug #55220 reported by Ian Jackson
2
Affects Status Importance Assigned to Milestone
xen-3.0 (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

 affects /distros/ubuntu/xen-3.0

This is my final submission today regarding the xen hotplug scripts.
I found that there was a significant amount of redundant faffing going
on in the hotplug scripts.

The changes below removes this but DO NOT APPLY THIS PATCH.
I don't fully understand the purpose of all of the things I'm removing
there and many of them may be important either functionally or as
error checking.

I'm filing this as a bug so that we have it recorded somewhere.

The changes are basically:
 * Do not bother checking whether we're reusing a device (sharing it
   inappropriately). The scripts I'm driving xm foobar with should
   guarantee that this can't be the case for me but of course that's
   not generally ideal.
 * Do not bother unsetting LC_*. In my edgy it seems that my udev
   doesn't have any LC_* set in its environment. I have no idea if
   this is generally true (in edgy or in all places where xen runs).
   It might be better simply to list all of the relevant
   LC_... variables. Alternatively, if the purpose of these was to
   make expr, awk, etc., behave predictably then they can be removed
   if expr, awk, etc., are no longer used.
 * Remove an instance of log debug.

Ian.

diff --exclude='*~' -ruN etc/xen/scripts/block /etc/xen/scripts/block
- --- etc/xen/scripts/block 2006-08-03 01:03:05.000000000 +0100
+++ /etc/xen/scripts/block 2006-08-04 18:20:16.000000000 +0100
@@ -62,6 +61,9 @@
 #
 check_sharing()
 {
+ echo ok
+ return
+#S^
   local dev="$1"
   local mode="$2"

@@ -149,6 +151,7 @@
 #
 check_device_sharing()
 {
+#S return
   local dev="$1"
   local mode=$(canonicalise_mode "$2")
   local result
@@ -175,6 +178,7 @@
 #
 check_file_sharing()
 {
+#S return
   local file="$1"
   local dev="$2"
   local mode="$3"
diff --exclude='*~' -ruN etc/xen/scripts/xen-hotplug-common.sh /etc/xen/scripts/xen-hotplug-common.sh
- --- etc/xen/scripts/xen-hotplug-common.sh 2006-08-03 01:03:05.000000000 +0100
+++ /etc/xen/scripts/xen-hotplug-common.sh 2006-08-03 18:53:05.000000000 +0100
@@ -16,16 +16,19 @@
 #

- -dir=$(dirname "$0")
+: ${dir:=$(dirname "$0")}
 . "$dir/logging.sh"
 . "$dir/xen-script-common.sh"
 . "$dir/locking.sh"

 exec 2>>/var/log/xen-hotplug.log

+#S echo "`date` $0 $*" >&2
+#S printenv | egrep '^[^A-Z_]' >&2 || true
+
 export PATH="/sbin:/bin:/usr/bin:/usr/sbin:$PATH"
 export LANG="POSIX"
- -unset $(set | grep ^LC_ | cut -d= -f1)
+#S unset $(set | grep ^LC_ | cut -d= -f1)

 fatal() {
   xenstore_write "$XENBUS_PATH"/hotplug-status error
@@ -84,9 +87,9 @@
 # such writing fails.
 #
 xenstore_write() {
- - log debug "Writing $@ to xenstore."
+#S log debug "Writing $@ to xenstore."
   xenstore-write "$@" || fatal "Writing $@ to xenstore failed."
 }

- -log debug "$@" "XENBUS_PATH=$XENBUS_PATH"
+#S log debug "$@" "XENBUS_PATH=$XENBUS_PATH"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFE040K8jyP9GfyNQARAr5WAJ46NFun8zRkYv2A/f8usNRCBUlvxwCfbvL9
aVqmn06PLA8XkZC7Zl+Q6Co=
=Swfl
-----END PGP SIGNATURE-----

Revision history for this message
Jérôme Guelfucci (jerome-guelfucci-deactivatedaccount) wrote :

Thank you for your bug report. Do you still have this issue with the latest stable release of Ubuntu ?

Changed in xen-3.0:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Ryan Kavanagh (ryanakca) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in xen-3.0:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.