xen hotplug scripts crazy performance changes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xen-3.0 (Ubuntu) |
Invalid
|
Medium
|
Unassigned |
Bug Description
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
affects /distros/
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
inappropriat
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/
- --- etc/xen/
+++ /etc/xen/
@@ -62,6 +61,9 @@
#
check_sharing()
{
+ echo ok
+ return
+#S^
local dev="$1"
local mode="$2"
@@ -149,6 +151,7 @@
#
check_
{
+#S return
local dev="$1"
local mode=$(
local result
@@ -175,6 +178,7 @@
#
check_
{
+#S return
local file="$1"
local dev="$2"
local mode="$3"
diff --exclude='*~' -ruN etc/xen/
- --- etc/xen/
+++ /etc/xen/
@@ -16,16 +16,19 @@
#
- -dir=$(dirname "$0")
+: ${dir:=$(dirname "$0")}
. "$dir/logging.sh"
. "$dir/xen-
. "$dir/locking.sh"
exec 2>>/var/
+#S echo "`date` $0 $*" >&2
+#S printenv | egrep '^[^A-Z_]' >&2 || true
+
export PATH="/
export LANG="POSIX"
- -unset $(set | grep ^LC_ | cut -d= -f1)
+#S unset $(set | grep ^LC_ | cut -d= -f1)
fatal() {
xenstore_write "$XENBUS_
@@ -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_
+#S log debug "$@" "XENBUS_
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFE040K8jy
aVqmn06PLA8XkZC
=Swfl
-----END PGP SIGNATURE-----
Thank you for your bug report. Do you still have this issue with the latest stable release of Ubuntu ?