Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 577965 Details for
Bug 813228
Add workaround for kernel breaking cpuset cgroup on hibernate/suspend
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
pm-utils hook to preserve cpuset affinity across suspend/hibernate
cpusets.sh (text/plain), 2.28 KB, created by
Daniel Berrangé
on 2012-04-17 09:30:46 UTC
(
hide
)
Description:
pm-utils hook to preserve cpuset affinity across suspend/hibernate
Filename:
MIME Type:
Creator:
Daniel Berrangé
Created:
2012-04-17 09:30:46 UTC
Size:
2.28 KB
patch
obsolete
>Note: Put this script in /usr/<lib or lib64>/pm-utils/sleep.d by prefixing >appropriate number (eg: /usr/lib64/pm-utils/sleep.d/02cpusets.sh). And then >give execute permissions to the script. It will save all the cpusets' cpu >configuration before suspend and restore them after resume. This is a >workaround until the problem gets fixed in the kernel. > >cpusets.sh >---- > >#! /bin/bash ># Script to save and restore the cpusets' cpu configuration after a ># suspend/resume cycle. ># This is a workaround for a Linux kernel bug which results in cpusets ># being reduced to a single cpu (boot cpu) after a suspend/resume ># cycle. ># ># Author: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> ># 16 March 2012 ># > >save_cpusets() >{ > rm -f saved_cpusets.txt > > # Check if cpusets are mounted separately > dir=`mount | grep cpuset` > if [ -z "$dir" ]; then > # Check if atleast cgroup is mounted > dir=`mount | grep cgroup` > if [ -z "$dir" ]; then > #Nothing to be done, as cpusets are not being used > exit 0 > fi > fi > > dir=`mount | grep cpuset | cut -d' ' -f3` > > # Omit the root cpuset (using mindepth parameter) since it is read-only > # (and will be restored properly after resume by the kernel itself). > > # Sorting is necessary because otherwise the hierarchy is not preserved > # and restore_cpusets() will have trouble restoring the cpusets. > # This is because of the rule that a child cpuset cannot have a cpu that > # is not present in its parent cpuset. > > find $dir -mindepth 2 -name "cpuset.cpus" -type f -print | sort > saved_path.txt > > # Delete saved_path.txt if it is NULL > val=`cat saved_path.txt` > if [ -z "$val" ]; then > rm -f saved_path.txt > exit 0 > fi > > for cpuset in `cat saved_path.txt` > do > cat $cpuset >> saved_cpusets.txt > done > > paste saved_path.txt saved_cpusets.txt > temp.txt > mv temp.txt saved_cpusets.txt > rm -f saved_path.txt >} > >restore_cpusets() >{ > if [ ! -f saved_cpusets.txt ]; then > # Nothing to be done > exit 0 > fi > > while read line > do > cpuset_path=`echo $line | cut -d' ' -f1` > value=`echo $line | cut -d' ' -f2` > echo "$value" > $cpuset_path > done < saved_cpusets.txt > > rm -f saved_cpusets.txt >} > >case "$1" in > suspend|hibernate) > save_cpusets > ;; > resume|thaw) > restore_cpusets > ;; > *) > ;; >esac > >exit $? >
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 Raw
Actions:
View
Attachments on
bug 813228
:
577965
|
578035