Linusも大喜びのミラクルパッチ

Linusも大喜びのミラクルパッチをあててみた。(Ubuntu10.10)

Linusも大喜びのミラクルパッチですが、Ubuntuには簡単にあてる事ができるということで早速やってみた。ネタはここ。書いてあるとおりやってみただけ。

gojappe@vodka:~$ wget http://launchpadlibrarian.net/59511828/cgroup_patch

まずはパッチをもらってくる。

--2010-12-24 21:28:32--  http://launchpadlibrarian.net/59511828/cgroup_patch
launchpadlibrarian.net をDNSに問いあわせています... 91.189.89.229, 91.189.89.228
launchpadlibrarian.net|91.189.89.229|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 3476 (3.4K) [text/plain]
`cgroup_patch' に保存中

100%[======================================>] 3,476       --.-K/s   時間 0s    

2010-12-24 21:28:33 (161 MB/s) - `cgroup_patch' へ保存完了 [3476/3476]

もらってきたスクリプトに実行権を与えて実行するだけ

gojappe@vodka:~$ chmod +x cgroup_patch
gojappe@vodka:~$ sudo ./cgroup_patch
[sudo] password for gojappe: 

すると、

Patching [/home/taki/.bashrc]...

Adding the patch...
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

Patching [/etc/rc.local]...

Adding the patch...
Making backup of /etc/rc.local in /etc/rc.local.backup.txt
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

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
exit 0

Making [/etc/rc.local] executable


Creating [/usr/local/sbin/cgroup_clean]...

#!/bin/sh
if [ "$*" != "/user" ]; then
rmdir /dev/cgroup/cpu/$*
fi

Making [/usr/local/sbin/cgroup_clean] executable

DONE. The patch has been applied. Restart your computer...

そんでもって最後に

gojappe@vodka:~$ sudo /etc/rc.local

これで終了。だが、本当に速くなったのかどうかはイマイチ体感できてないです。

更新日時:2011/01/18 19:33:37
キーワード:
参照:[本日のメニュー]
このページは凍結されています。