LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 03:48 AM   #1
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
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, 04:21 AM   #2
witek
Member
 
Registered: Oct 2008
Location: Poland, Łódź
Distribution: Lubuntu, Salix
Posts: 105

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, 04:53 AM   #3
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

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

Rep: Reputation: 282Reputation: 282Reputation: 282
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, 06:34 AM   #5
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,901

Rep: Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025
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, 06:39 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
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, 06:52 AM   #7
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
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 06:56 AM.
 
Old 11-19-2010, 07:11 AM   #8
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,901

Rep: Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025
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 07:29 AM.
 
Old 11-19-2010, 07:12 AM   #9
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

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

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

Rep: Reputation: 121Reputation: 121
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, 09:52 AM   #12
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
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, 11:11 AM   #13
AlvaroG
Member
 
Registered: Jul 2009
Location: Canelones, Uruguay
Distribution: Slackware
Posts: 147

Rep: Reputation: 43
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 11:13 AM.
 
Old 11-20-2010, 03: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, 08:41 PM   #15
BrZ
Member
 
Registered: Apr 2009
Distribution: Slackware
Posts: 543

Rep: Reputation: 121Reputation: 121
@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



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 03:51 PM
LXer: The ~200 Line Linux Kernel Patch That Does Wonders LXer Syndicated Linux News 0 11-16-2010 12:00 PM
CPU consumption - %usr and %sys ?? gomes1333 Linux - General 6 04-03-2010 05:13 AM
why a process ( written in c++) taking 200% cpu usage? sasd Linux - Games 2 03-24-2010 12:24 AM
missing file??? /proc/sys/kernel/sysrq bad_gui Linux - General 4 08-18-2006 10:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:36 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration