Here is what Knurpht and I have applied to our openSUSE-11.3 PCs to test the alternative to the 200 line kernel patch:
With root permissions, add the following lines to the end of /etc/init.d/boot.local
mkdir -p /dev/cgroup/cpu
mount -t cgroup cgroup /dev/cgroup/cpu -o cpu
mkdir -m 0777 /dev/cgroup/cpu/user
echo "/usr/local/sbin/cgroup_clean" > /dev/cgroup/cpu/release_agent
then as a regular user add the following to our ~/.bashrc file :
if "$PS1" ] ; then
mkdir -p -m 0700 /dev/cgroup/cpu/user/$$ > /dev/null 2>&1
echo $$ > /dev/cgroup/cpu/user/$$/tasks
echo "1" > /dev/cgroup/cpu/user/$$/notify_on_release
fi
then (with root permissions) created the file /usr/local/sbin/cgroup_clean with this content:
#!/bin/sh
rmdir /dev/cgroup/cpu/$*
and change the permissions on that file with the code:
su -c 'chmod +x /usr/local/sbin/cgroup_clean'
and then when booting, use the boot code:
cgroup_enable=memory
in my case, with root permissions I added “cgroup_enable=memory” to my /boot/grub/menu.lst file after the “splash=silent quiet showopts vga=0x346” in that file’s main boot such that that line ends with “splash=silent quiet showopts vga=0x346 cgroup_enable=memory”. Note I did NOT touch the failsafe section in the /boot/grub/menu.lst.
Then I restarted and tested.
I don’t think this can be applied to an openSUSE-11.2 or earlier PC. It needs to be an openSUSE-11.3 PC. This may not work on an openSUSE-11.4 PC as I think the “cgroup_enable” boot code may have been removed from the 11.4 kernel < not sure > .
EDIT - only those with the kernel-default should be applying this too (I believe < not sure > )
Ubuntu reference (which we copied) is here: Alternative To The "200 Lines Kernel Patch That Does Wonders" Which You Can Use Right Away ~ Web Upd8: Ubuntu / Linux blog