Page: 1, 2, 3  Next

2.6.36 Kernel "Killer Feature" Request Please
TheExplorer
Status: Interested
Joined: 21 Sep 2010
Posts: 35
Reply Quote
Damentz,

There is a solution for 2.6.36 kernel that dramatically improves desktop interactivity. It deals with cgroups and stuff.

Edit your /etc/rc.local:

:: Code ::
mkdir -p /dev/cgroup/cpu
mount -t cgroup cgroup /dev/cgroup/cpu -o cpu
mkdir -m 0777 /dev/cgroup/cpu/user


Edit your ~/.bashrc:

:: Code ::
if [ "$PS1" ] ; then 
        mkdir -m 0700 /dev/cgroup/cpu/user/$$
        echo $$ > /dev/cgroup/cpu/user/$$/tasks
fi


Even Linus Torvalds was amazed and called it a "killer feature" here.
And here are some benchmarks and numbers.

Actually, at first a patch was proposed but it works better and more native with the above method.

But, when bfs and other patches are applied it can be somehow broken. Well, I'm not very good at patching but people say that the patch couldn't be applied over already bfs-patched kernel. So, I have to compile the pure vanilla kernel and use this method only, but still want to use your kernels...

The question is: can you implement this in the 2.6.36 branch?

This topic is actually a repost of mine from here. If you reply me over there then you may delete it here.

Thank you in advance.

P.S. I'm writing this request from a fresh compiled 2.6.36 kernel with this feature on. And I'm truly amazed with the responsibility: I have other compilation process in the background, running VirtualBox and a movie in mplayer... The system just doesn't lag anymore for me!
Back to top
eklipze
Status: New User - Welcome
Joined: 17 Nov 2010
Posts: 1
Reply Quote
nice little edit! thanks!
Back to top
nutellajunkie
Status: Curious
Joined: 17 Nov 2010
Posts: 8
Location: EU
Reply Quote
This does what the patch does then?
Back to top
damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 737
Reply Quote
I responded to your thread on forums.debian.net

:: nutellajunkie wrote ::
This does what the patch does then?

It groups all tasks under a TTY under the same cgroup. This allows you to run incredibly multithreaded tasks under a single tty (konsole, xterm, gnome-terminal, etc) without reducing the fairness of other single threaded tasks you may be running.
Back to top
TheExplorer
Status: Interested
Joined: 21 Sep 2010
Posts: 35
Reply Quote
:: nutellajunkie wrote ::
This does what the patch does then?


Yes. You don't have to patch your kernel. Just switch on the grouping feature in General Setup and in the Scheduler (I mean when 'make menuconfig').
Back to top
macaddict
Status: New User - Welcome
Joined: 08 Nov 2010
Posts: 2
Reply Quote
Nice! I'm drooling already :-)

Thanks for the tip on this 'feature'.
Back to top
TheExplorer
Status: Interested
Joined: 21 Sep 2010
Posts: 35
Reply Quote
Damentz,
I have only one question concerning this kernelspace autogrouping feature: you know there are packages like libpam-cgroup, cgroup-bin and libcgroup in the repos. The first one is a PAM module to move a user session into a cgroup. Do we need them and will there be any profit of them?

Thank you.
Back to top
damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 737
Reply Quote
I would like to say that none of those packages are necessary since all the grouping is done in kernel space without your interaction. You can try removing those packages to see what happens, I can't guarantee that something won't break.
Back to top
TheExplorer
Status: Interested
Joined: 21 Sep 2010
Posts: 35
Reply Quote
damentz,

People say that BFS and the autogrouping feature don't get on with each other. That BFS is known to break the kernel API and the autogrouping feature simply doesn't work after the patching.
Is it true?
Back to top
damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 737
Reply Quote
BFS doesn't use cgroups, and thus, autogrouping would do absolutely nothing. I updated Kconfig to make autogrouping and exclusive feature of CFS so that no one accidentally enables autogrouping when BFS is selected.

Here's the commit: git.zen-kernel.org/zen-stable/commit/?h=zen-tune&id=644d3c93b3da3a4cbda64bc2ca362f3db2513239

Otherwise, I'm getting reports that BFS still works and people are still actively using it.
Back to top
Display posts from previous:   
Page: 1, 2, 3  Next
All times are GMT - 8 Hours