LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 11-19-2010, 04:48 AM   #1
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,227

Rep: Reputation: 86
Alternative to 200 lines kernel patch, /sys/fs/cgroup/cpu missing


Hi !

I tried this :
http://www.webupd8.org/2010/11/alter...nel-patch.html

Compiled my kernel with all cgroups options, but /sys/fs/cgroup/cpu, and i can't mkdir it.

Any idea ?
 
Old 11-19-2010, 05:21 AM   #2
witek
Member
 
Registered: Oct 2008
Location: Poland, Łódź
Distribution: Lubuntu, Salix
Posts: 102

Rep: Reputation: 19
I`m wondering what these entries in .bashrc mean? And if it works why hasn`t it been used before? It looks that linux kernel got big and complicated and nobody understands it as a whole if someone tries to patch a kernel against something solvable with bash setup.
 
Old 11-19-2010, 05:53 AM   #3
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,227

Original Poster
Rep: Reputation: 86
Well it seems it's a trick nobody though about. Linux is ahead it's own developers ^^.
 
Old 11-19-2010, 07:09 AM   #4
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 755

Rep: Reputation: 227Reputation: 227Reputation: 227
http://lkml.org/lkml/2010/11/16/351

Seems the bash script stuff was used to test a feature of the kernel.

The patch is the permanent solution.
 
Old 11-19-2010, 07:34 AM   #5
GazL
Senior Member
 
Registered: May 2008
Posts: 3,480

Rep: Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016
All this cgroup stuff is clever, but can't you just run your heavy process under nice if you want to keep working on your desktop while it runs? That's what I do.
 
Old 11-19-2010, 07:39 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,619
Blog Entries: 2

Rep: Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076Reputation: 4076
Quote:
Originally Posted by GazL View Post
All this cgroup stuff is clever, but can't you just run your heavy process under nice if you want to keep working on your desktop while it runs? That's what I do.
Of course you can, but how many users are actually using this way? I think most normal users are even not aware of nice. The kernel patch will automate this.
 
Old 11-19-2010, 07:52 AM   #7
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,227

Original Poster
Rep: Reputation: 86
nice works well but requires users to do things manually.

Compiled and installed libcgroup.
Created /cgroup/cpu/

Did :
mount -t cgroup cgroup /cgroup/cpu/ -o cpu
mkdir -m 0777 /cgroup/cpu/user/

Here's my .bashrc :
if [ "$PS1" ] ; then
mkdir -m 0700 /cgroup/cpu/user/$$
echo $$ > /cgroup/cpu/user/$$/tasks
fi

But it changes nothing !

On other distros, seems there's a cgconfig service to start...

Last edited by Linux.tar.gz; 11-19-2010 at 07:56 AM.
 
Old 11-19-2010, 08:11 AM   #8
GazL
Senior Member
 
Registered: May 2008
Posts: 3,480

Rep: Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016
Quote:
Originally Posted by TobiSGD View Post
Of course you can, but how many users are actually using this way? I think most normal users are even not aware of nice. The kernel patch will automate this.
The risk is that it could have side effects for those who do want to control this themselves using nice.

I think I'll go google up some information. I'm curious how this new automated cgroup patch will interact with manually niced processes.

As long as it's a kernel option you can disable I don't see it as problem, but it's a solution for a problem I don't have so I can't get excited about it.


edit: Con Kolivas has blogged on the subject of the new patch. Interesting read.

Last edited by GazL; 11-19-2010 at 08:29 AM.
 
Old 11-19-2010, 08:12 AM   #9
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,227

Original Poster
Rep: Reputation: 86
Cross link :
http://www.linuxquestions.org/questi...groups-844712/
 
Old 11-19-2010, 08:35 AM   #10
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,227

Original Poster
Rep: Reputation: 86
Yay ! Con Kolivas breaks all our dreams ^^.
The "schedtool -D -e make -j64 blahblah" seems very interesting.
 
Old 11-19-2010, 09:17 AM   #11
BrZ
Member
 
Registered: Apr 2009
Distribution: Slackware
Posts: 501

Rep: Reputation: 83
The patch (posted by Mike Galbraith - clean 2.6.36): http://marc.info/?l=linux-kernel&m=129011104931337&w=2

Only that? Any other interaction? libcgroup anyone??
 
Old 11-19-2010, 10:52 AM   #12
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,227

Original Poster
Rep: Reputation: 86
It works !!!

Just remember to CLOSE the terminal when testing, because it keeps the .bashrc settings, even if you modify it (of course)!
 
Old 11-19-2010, 12:11 PM   #13
AlvaroG
Member
 
Registered: Jul 2009
Location: Canelones, Uruguay
Distribution: Slackware
Posts: 128

Rep: Reputation: 31
In the slashdot discussion on the subject it was mentioned several times that this will only work for applications started from a tty, or a single bash session. This means, as Con Kolivas wrote, that the "normal" GUI apps started from the desktop (e.g. via krunner or the kde menu) will not see a difference (as all of them will be grouped together), and that in any case the window manager may be modified to do something similar to what the scripts do.

The reply from Kolivas is however a little naive. Many people reported better performance, but he is mainly attacking the patch basing his reply on what Linus wrote.

my useless opinion: Considering how explorer.exe usually just freezes the whole windows xp interface in the office pc, I have always felt that Linux does a good job handling load. In some distributions the desktop feels sluggish, while in others it does not (personal experience: kde on OpenSuSE 10.3 x86_64 was a pain compared to Slackware 12.2 on the same machine), so the system setup matters. Desktop effects sometimes slow things, or makes things look slow: I don't really like to wait for a menu to show up just because it is fading in.

I will be happy anyway to have a way to avoid my backup (to an external USB drive, run by root usually in tty6) making the desktop slow, which is something I do see on my system with any distro I've tried.

Last edited by AlvaroG; 11-19-2010 at 12:13 PM.
 
Old 11-20-2010, 04:34 PM   #14
Ian John Locke II
Member
 
Registered: Mar 2008
Location: /dev/null
Distribution: Slackware, Android, Slackware64
Posts: 130

Rep: Reputation: 17
Quote:
Originally Posted by Linux.tar.gz View Post
It works !!!

Just remember to CLOSE the terminal when testing, because it keeps the .bashrc settings, even if you modify it (of course)!
Or do source ~/.bashrc
 
Old 11-20-2010, 09:41 PM   #15
BrZ
Member
 
Registered: Apr 2009
Distribution: Slackware
Posts: 501

Rep: Reputation: 83
@Linux and Ian,

When firing up the thing, I got:
Quote:
# ./cgconfig start
Starting cgconfig service:
found cpu in rw,relatime,cpu
Found cgroup option rw,relatime,cpu, count 0
found cpuacct in rw,relatime,cpuacct
Found cgroup option rw,relatime,cpuacct, count 1
found devices in rw,relatime,devices
Found cgroup option rw,relatime,devices, count 2
found memory in rw,relatime,memory
Found cgroup option rw,relatime,memory, count 3
creating all cgroups now, error=0
list of controllers is found
cgroup path is (null)
...up
'cgroup path is (null)'? <-- ok?

Would you mind sharing your configs for libcgroup and kernel (cgroup)? =]
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: The ~200 Line Linux Kernel Patch That Does Wonders LXer Syndicated Linux News 0 11-16-2010 04:51 PM
LXer: The ~200 Line Linux Kernel Patch That Does Wonders LXer Syndicated Linux News 0 11-16-2010 01:00 PM
CPU consumption - %usr and %sys ?? gomes1333 Linux - General 6 04-03-2010 06:13 AM
why a process ( written in c++) taking 200% cpu usage? sasd Linux - Games 2 03-24-2010 01:24 AM
missing file??? /proc/sys/kernel/sysrq bad_gui Linux - General 4 08-18-2006 11:37 PM


All times are GMT -5. The time now is 04:44 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration