Bug#461630: Adjust cpu_share for boinc user (for 2.6.24 cfs scheduler)
James Westby
jw+debian at jameswestby.net
Sun Feb 17 18:33:28 UTC 2008
tags 461630 patch
thanks
Hi,
I am attaching the patch used in Ubuntu to work around this issue
for your consideration, and so I am also setting the patch tag
again.
The author of the patch, Daniel Hahler, acknowledges that it is a
workaround, but I believe it is a working solution to the issue.
Thanks,
James
diff -pruN 5.10.30-5/debian/boinc-client.init
5.10.30-5ubuntu3/debian/boinc-client.init
--- 5.10.30-5/debian/boinc-client.init 2008-02-04 03:12:53.000000000 +0000
+++ 5.10.30-5ubuntu3/debian/boinc-client.init 2008-02-04 03:11:41.000000000 +0000
@@ -148,6 +148,13 @@ status()
schedtool $children
fi
fi
+
+ # Display cpu_share info:
+ UID=`id -u $BOINC_USER`
+ CPU_SHARE_FILE="/sys/kernel/uids/$UID/cpu_share"
+ if [ -f "$CPU_SHARE_FILE" ]; then
+ log_success_msg "cpu_share: `cat "$CPU_SHARE_FILE"`"
+ fi
else
log_success_msg "$STATUS stopped."
fi
diff -pruN 5.10.30-5/debian/boinc-client.udev 5.10.30-5ubuntu3/debian/boinc-client.udev
--- 5.10.30-5/debian/boinc-client.udev 1970-01-01 01:00:00.000000000 +0100
+++ 5.10.30-5ubuntu3/debian/boinc-client.udev 2008-02-04 03:11:41.000000000 +0000
@@ -0,0 +1 @@
+SUBSYSTEM=="kernel", DEVPATH=="/kernel/uids/*", ACTION=="add", RUN+="/usr/lib/boinc-client/udev-usr_share"
diff -pruN 5.10.30-5/debian/changelog 5.10.30-5ubuntu3/debian/changelog
--- 5.10.30-5/debian/changelog 2008-02-04 03:12:53.000000000 +0000
+++ 5.10.30-5ubuntu3/debian/changelog 2008-02-04 03:11:41.000000000 +0000
@@ -1,3 +1,35 @@
+boinc (5.10.30-5ubuntu3) hardy; urgency=low
+
+ * Install /usr/lib/boinc-client/udev-usr_share with correct perms
+ (executable), so that it gets called by udevd.
+
+ -- Daniel Hahler <ubuntu at thequod.de> Mon, 04 Feb 2008 00:40:08 +0100
+
+boinc (5.10.30-5ubuntu2) hardy; urgency=low
+
+ * Revert changes from ubuntu1 and instead use the uevent udev
+ interface to assign the lowest possible cpu_share to the
+ boinc user. This is still considered to be a workaround.
+ - Add debian/boinc-client.udev
+ - debian/rules: call dh_installudev
+ - Add debian/extra/udev-usr_share, which gets run by udevd
+ - Drop debian/patches/ubuntu_temp_cfs_fix.patch
+ * debian/boinc-client.init: Display cpu_share info for "status"
+ action
+
+ -- Daniel Hahler <ubuntu at thequod.de> Sat, 02 Feb 2008 23:32:25 +0100
+
+boinc (5.10.30-5ubuntu1) hardy; urgency=low
+
+ * debian/patches/ubuntu_temp_cfs_fix.patch:
+ Temporary workaround for the new CFS Linux scheduler,
+ by adjusting the "boinc" user's cpu_share to the minimum (2)
+ in the init script (LP: #177713)
+ * Modify Maintainer value to match the DebianMaintainerField
+ specification.
+
+ -- Daniel Hahler <ubuntu at thequod.de> Sat, 02 Feb 2008 02:48:01 +0100
+
boinc (5.10.30-5) unstable; urgency=low
[ Frank S. Thomas ]
diff -pruN 5.10.30-5/debian/extra/udev-usr_share 5.10.30-5ubuntu3/debian/extra/udev-usr_share
--- 5.10.30-5/debian/extra/udev-usr_share 1970-01-01 01:00:00.000000000 +0100
+++ 5.10.30-5ubuntu3/debian/extra/udev-usr_share 2008-02-04 03:11:41.000000000 +0000
@@ -0,0 +1,17 @@
+#!/bin/sh
+#
+# This script gets called by udev, when an entry in
+# /sys/kernel/uids gets added.
+#
+# It is used by boinc-client to assign the lowest
+# possible cpu_share of 2 to the boinc user.
+#
+# ACTION=add
+# DEVPATH=/kernel/uids/[uid]
+#
+
+uid=${DEVPATH##*/}
+if [ "$uid" = "$(id -u boinc)" ]
+then
+ echo 2 > /sys/$DEVPATH/cpu_share
+fi
diff -pruN 5.10.30-5/debian/rules 5.10.30-5ubuntu3/debian/rules
--- 5.10.30-5/debian/rules 2008-02-04 03:12:53.000000000 +0000
+++ 5.10.30-5ubuntu3/debian/rules 2008-02-04 03:11:41.000000000 +0000
@@ -205,6 +205,11 @@ install-arch: build
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+ # udev rule and script for it
+ dh_installudev
+ install -D debian/extra/udev-usr_share \
+ debian/boinc-client/usr/lib/boinc-client/udev-usr_share
+
dh_install -a
#
More information about the pkg-boinc-devel
mailing list