...The patch being talked about is designed to automatically create task groups per TTY in an effort to improve the desktop interactivity under system strain. Mike Galbraith wrote the patch, which is currently in its third version in recent weeks, after Linus Torvalds inspired this idea. In its third form (patch), this patch only adds 224 lines of code to the kernel's scheduler while stripping away nine lines of code, thus only 233 lines of code are in play.
Tests done by Mike show the maximum latency dropping by over ten times and the average latency of the desktop by about 60 times. Linus Torvalds has already heavily praised (in an email) this miracle patch....
Kernel patch speeds up Linux
Kernel patch speeds up Linux
The ~200 Line Linux Kernel Patch That Does Wonders
Yes in Swedish at the idg.se site but I was too lazy to translate into english and failed to find your text so I waited and there your post came.In recent weeks and months there has been quite a bit of work towards improving the responsiveness of the Linux desktop with some very significant milestones building up recently and new patches continuing to come. This work is greatly improving the experience of the Linux desktop when the computer is withstanding a great deal of CPU load and memory strain. Fortunately, the exciting improvements are far from over. There is a new patch that has not yet been merged but has undergone a few revisions over the past several weeks and it is quite small -- just over 200 lines of code -- but it does wonders for the Linux desktop.
Looks interesting but it comes in first quarter of 2011 and not in the kernel that is about to get released now?
I use Google Search on Puppy Forum
not an ideal solution though
not an ideal solution though
I tried on 2.6.35.7. It's not going to go on easy.
Code: Select all
patch -p1 --dry-run < performance.patch
patching file include/linux/sched.h
Hunk #1 succeeded at 513 (offset 4 lines).
Hunk #3 succeeded at 1903 (offset -33 lines).
patching file kernel/sched.c
Hunk #1 FAILED at 78.
Hunk #2 succeeded at 611 (offset 5 lines).
Hunk #3 FAILED at 2015.
Hunk #4 succeeded at 7548 (offset -436 lines).
Hunk #5 succeeded at 8509 (offset -5 lines).
Hunk #6 succeeded at 8103 (offset -436 lines).
2 out of 6 hunks FAILED -- saving rejects to file kernel/sched.c.rej
patching file kernel/fork.c
Hunk #1 succeeded at 173 (offset -1 lines).
Hunk #2 succeeded at 903 with fuzz 1 (offset -3 lines).
can't find file to patch at input line 164
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: linux-2.6/drivers/tty/tty_io.c
|===================================================================
|--- linux-2.6.orig/drivers/tty/tty_io.c
|+++ linux-2.6/drivers/tty/tty_io.c
--------------------------
- Sit Heel Speak
- Posts: 2595
- Joined: Fri 31 Mar 2006, 03:22
- Location: downwind
Attempt at the super miracle patch on Wary k-2.6.31.14
An attempt on your 2.6.31.14 Wary kernel, after adjusting the patch to point not at drivers/tty/tty_io.c but rather where it resides in this older kernel, drivers/char/tty_io.c:BarryK wrote:Very interesting, I wonder if the patch will apply on older kernels, like my 2.6.31.14 used in Wary?
Code: Select all
# pwd
/mnt/sdb2/KERNEL_SOURCE/2.6.31.14 Barry's--experiment with super miracle patch/testbed/usr/src/linux-2.6.31.14
#
# patch -p1 -N --dry-run < ../the_patch
patching file include/linux/sched.h
Hunk #1 succeeded at 523 (offset 14 lines).
Hunk #2 succeeded at 588 (offset 10 lines).
Hunk #3 succeeded at 1849 (offset -87 lines).
patching file kernel/sched.c
Hunk #1 FAILED at 78.
Hunk #2 FAILED at 606.
Hunk #3 FAILED at 2010.
Hunk #4 FAILED at 7984.
Hunk #5 succeeded at 9788 with fuzz 2 (offset 1274 lines).
Hunk #6 succeeded at 9815 with fuzz 1 (offset 1276 lines).
4 out of 6 hunks FAILED -- saving rejects to file kernel/sched.c.rej
patching file kernel/fork.c
Hunk #1 FAILED at 174.
Hunk #2 succeeded at 871 with fuzz 2 (offset -35 lines).
1 out of 2 hunks FAILED -- saving rejects to file kernel/fork.c.rej
patching file drivers/char/tty_io.c
Hunk #1 succeeded at 3009 (offset -151 lines).
patching file kernel/sched_autogroup.h
patching file kernel/sched_autogroup.c
patching file kernel/sysctl.c
Hunk #1 succeeded at 366 with fuzz 2 (offset -16 lines).
patching file init/Kconfig
Hunk #1 succeeded at 614 with fuzz 2 (offset -114 lines).
patching file Documentation/kernel-parameters.txt
Hunk #1 succeeded at 1558 (offset -64 lines).
#
http://www.webupd8.org/2010/11/alternative-to-200-lines-kernel-patch.html
The Ubuntu laptop is perfect to test this on, because normally it has trouble playing music and using Firefox at the same time - I very frequently have to turn the volume down for a page to load.
Or, should I say it used to have trouble...
I'm using this right now on my Ubuntu laptop, and it's working awesome.Alternative To The "200 Lines Kernel Patch That Does Wonders" Which You Can Use Right Away
Phoronix recently published an article regarding a ~200 lines Linux Kernel patch that improves responsiveness under system strain. Well, Lennart Poettering, a RedHat developer replied to Linus Torvalds on a maling list with an alternative to this patch that does the same thing yet all you have to do is run 2 commands and paste 4 lines in your ~/.bashrc file. I know it sounds unbelievable, but apparently someone even ran some tests which prove that Lennart's solution works. Read on!
The Ubuntu laptop is perfect to test this on, because normally it has trouble playing music and using Firefox at the same time - I very frequently have to turn the volume down for a page to load.
Or, should I say it used to have trouble...
I'm running the patch now with 2.6.37-rc2 on ubuntu lucid
So far its working good, although I wouldn't say its a 10X improvement.
Big Buck Bunny @1080p, Midori, Thunderbird, Gnome Terminal, Bricscad, and glxgears all running at the same time. The video payback was slightly choppy but everything else responded ok.
Keep in mind, this is on a core 2 duo with intel GM965/GL960 video. Not exactly the cream of the crop.
If I get some actual numbers I will post them.
So far its working good, although I wouldn't say its a 10X improvement.
Big Buck Bunny @1080p, Midori, Thunderbird, Gnome Terminal, Bricscad, and glxgears all running at the same time. The video payback was slightly choppy but everything else responded ok.
Keep in mind, this is on a core 2 duo with intel GM965/GL960 video. Not exactly the cream of the crop.
If I get some actual numbers I will post them.
- Sit Heel Speak
- Posts: 2595
- Joined: Fri 31 Mar 2006, 03:22
- Location: downwind
Attempt--k2.6.31.14 alternative script to the miracle patch
It seems that one ought *somehow* to apply this alternative script to Puppy. But I know nothing of cgroups, don't know how to apply them.
I have re-compiled the wary 2.6.31.14 kernel with cgroups and configfs activated, as shown in these three screencaps:
http://i53.tinypic.com/21948za.png
http://i51.tinypic.com/j803kh.png
http://i53.tinypic.com/6giohy.png
then have attempted to replicate the commands disclosed at
http://lkml.org/lkml/2010/11/16/392
starting thusly:
Code: Select all
cd /config
mkdir fs
cd fs
mkdir cgroup
cd cgroup
mkdir cpu
cd cpu
mkdir user
cd user
Code: Select all
# echo $$ > /config/fs/cgroup/cpu/user/$$/tasks
Code: Select all
# echo $$ > /config/fs/cgroup/cpu/user/$$/tasks
bash: /config/fs/cgroup/cpu/user/8817/tasks: No such file or directory
Code: Select all
mkdir 8817
Code: Select all
# echo $$ > /config/fs/cgroup/cpu/user/$$/tasks
I then tried (and got):
Code: Select all
# mount -t cgroup cgroup /sys/fs/cgroup/cpu -o cpu
mount: mount point /sys/fs/cgroup/cpu does not exist
Code: Select all
# mount -t cgroup cgroup /config/fs/cgroup/cpu -o cpu
Code: Select all
mount: special device cgroup does not exist
Anyone have any other ideas?
cgroup patching puppylinux
Okay, this is how I did it, BUT DO NOTICE THAT mount -t cgroup DOES NOT WORK WITH KERNEL 2.6.33.2! Can someone take a look at implementing cgroup in kernel?
Add the following commands in your /etc/rc.d/rc.local (open it with: geany /etc/rc.d/rc.local) file:
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
and make it executable:
chmod +x /etc/rc.d/rc.local
And then add the following to your /root/.bashrc file (to open it: geany /root/.bashrc):
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
Run the following command:
geany /usr/local/sbin/cgroup_clean
And paste this:
#!/bin/sh
rm -rf /dev/cgroup/cpu/user/$*
then save the file and make it executable:
chmod +x /usr/local/sbin/cgroup_clean
And finally, restart the computer or manually run the /etc/rc.d/rc.local file ("/etc/rc.d/rc.local").
Run "ls /dev/cgroup/cpu/user/" to see if the different groups are created and running
Add the following commands in your /etc/rc.d/rc.local (open it with: geany /etc/rc.d/rc.local) file:
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
and make it executable:
chmod +x /etc/rc.d/rc.local
And then add the following to your /root/.bashrc file (to open it: geany /root/.bashrc):
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
Run the following command:
geany /usr/local/sbin/cgroup_clean
And paste this:
#!/bin/sh
rm -rf /dev/cgroup/cpu/user/$*
then save the file and make it executable:
chmod +x /usr/local/sbin/cgroup_clean
And finally, restart the computer or manually run the /etc/rc.d/rc.local file ("/etc/rc.d/rc.local").
Run "ls /dev/cgroup/cpu/user/" to see if the different groups are created and running
SHS, what is this /config directory? The stuff needs to go under sysfs because that is where the virtual file system interface is. You need a 'mkdir $$' after cd'ing into: /sysfs/fs/cgroup/cpu/user/
Simpler to just do:
mkdir -p -m700 /config/fs/cgroup/cpu/user/$$
before:
echo $$ > /config/fs/cgroup/cpu/user/$$/tasks
Simpler to just do:
mkdir -p -m700 /config/fs/cgroup/cpu/user/$$
before:
echo $$ > /config/fs/cgroup/cpu/user/$$/tasks
Would this work as a .pet? (using a pinstall.sh script):
I'm gonna try it and test
EDIT: I get the
I'm using kernel 2.6.25.16
Code: Select all
#!/bin/bash
[ ! -e /etc/rc.d/rc.local ] && exit 0
# apply changes in rc.local
echo '
# speedup
mkdir -p /dev/cgroup/cpu
mount -t cgroup cgroup /dev/cgroup/cpu -o cpu
mkdir -m 0777 /dev/cgroup/cpu/user
"/usr/local/sbin/cgroup_clean" > /dev/cgroup/cpu/release_agent
' >> /etc/rc.d/rc.local
# make rc.local executable
[ ! -x /etc/rc.d/rc.local ] && chmod +x /etc/rc.d/rc.local
# apply changes in /root/.bashrc
echo '
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
' >> /root/.bashrc
# create /usr/local/sbin/cgroup_clean if needed
echo '
#!/bin/sh
rm -rf /dev/cgroup/cpu/user/$*
' > /usr/local/sbin/cgroup_clean
# make it executable
chmod +x /usr/local/sbin/cgroup_clean
# run it, so its applied immediately
exec /etc/rc.d/rc.local &
REPLY=""
Xdialog --title "Speed up ting" --msgbox "The speed up thing should be installed and running.\n\nDo you want to check?" 0 0
REPLY=$?
[ "$REPLY" = 0 ] && rvxt -e ls /dev/cgroup/cpu/user/ &
exit 0
EDIT: I get the
Code: Select all
mount: unknown filesystem type 'cmount'
- Attachments
-
- speedup-installer.pet
- the above code, self installer, may work for someone??
- (813 Bytes) Downloaded 361 times
Last edited by sc0ttman on Fri 03 Dec 2010, 17:02, edited 4 times in total.
There is another thread for this here http://murga-linux.com/puppy/viewtopic. ... 178a3bf070
but it is inconclusive
but it is inconclusive
Spup Frugal HD and USB
Root forever!
Root forever!