Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 169386 Details for
Bug 243194
[patch] sci-misc/boinc: more scheduling control in init script
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Use chrt and cpu_share
bug243194a.patch (text/plain), 1.59 KB, created by
Martin von Gagern
on 2008-10-22 10:07:06 UTC
(
hide
)
Description:
Use chrt and cpu_share
Filename:
MIME Type:
Creator:
Martin von Gagern
Created:
2008-10-22 10:07:06 UTC
Size:
1.59 KB
patch
obsolete
>diff -ur files.orig/boinc.conf files/boinc.conf >--- files.orig/boinc.conf 2005-10-29 17:06:10.000000000 +0200 >+++ files/boinc.conf 2008-10-22 11:48:46.000000000 +0200 >@@ -18,3 +18,11 @@ > > # nice level > NICELEVEL="19" >+ >+# scheduling parameters, arguments to chrt(1) >+SCHED_PARAM="--batch 0" >+ >+# Relative CPU allocation for boinc user, default is 1024, >+# requires CONFIG_FAIR_GROUP_SCHED and CONFIG_USER_SCHED, >+# see /usr/src/linux/Documentation/scheduler/sched-design-CFS.txt >+CPU_SHARE="128" >diff -ur files.orig/boinc.init files/boinc.init >--- files.orig/boinc.init 2005-12-18 14:36:13.000000000 +0100 >+++ files/boinc.init 2008-10-22 11:53:36.000000000 +0200 >@@ -41,11 +41,31 @@ > ARGS="${ARGS} -allow_remote_gui_rpc" > fi > >- setsid start-stop-daemon --quiet --start --chdir ${RUNTIMEDIR} \ >+ if [ "${SCHED_PARAM}" -a -x /usr/bin/chrt ]; then >+ CHRT="/usr/bin/chrt ${SCHED_PARAM}" >+ else >+ CHRT="" >+ fi >+ >+ ${CHRT} start-stop-daemon \ >+ --quiet --start --chdir ${RUNTIMEDIR} \ > --exec ${BOINCBIN} --chuid ${USER}:${GROUP} \ >- --nicelevel ${NICELEVEL} -- ${ARGS} > ${LOGFILE} 2>&1 & >+ --background --stdout ${LOGFILE} --stderr ${LOGFILE} \ >+ --nicelevel ${NICELEVEL} -- ${ARGS} > >- eend $? >+ RESULT=$? >+ >+ if [ "${CPU_SHARE}" -a -d /sys/kernel/uids ]; then >+ BUID=`id -u ${USER}` >+ # It might take a moment for start-stop-daemon to chuid >+ [ -d /sys/kernel/uids/${BUID} ] || sleep 1 >+ [ -d /sys/kernel/uids/${BUID} ] || sleep 2 >+ if [ -w /sys/kernel/uids/${BUID}/cpu_share ]; then >+ echo ${CPU_SHARE} > /sys/kernel/uids/${BUID}/cpu_share >+ fi >+ fi >+ >+ eend ${RESULT} > } > > attach() {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 243194
: 169386