View Single Post
Posts: 1,101 | Thanked: 1,185 times | Joined on Aug 2008 @ Spain
#2079
Originally Posted by karam View Post
@maacruz
actually it does assign processes to cgroup
you can check your self
the 1st version of speedpatch didn't do that
mmm (me scratches head), let's see
Pali, freemangordon and the rest of the respectable members of this forum, I ask for your forgiveness for going off-topic, this will be the only and last time.
Code:
/tmp $ apt-cache showpkg speedpatch
Package: speedpatch
Versions: 
1.9-5 (/var/lib/apt/lists/repository.maemo.org_extras-devel_dists_fremantle-1.3_free_binary-armel_Packages)
Yes, I suppose this is the last version.
(me apt-get -d install speedpatch)
(me dpkg -x speedpatch /tmp/speedpatch)
Code:
/tmp/speedpatch $ find -type f
./home/user/.bashrc.speedpatch
./home/user/.profile.speedpatch
./usr/local/sbin/cgroup_clean
./etc/event.d/speedpatch
./etc/rc.local
That must be it. Let's look at it.
rc.local -> this just creates the cgroup user directory and sets the cgroup_clean script as release agent
evet.d/speedpatch -> just the same
cgroup_clean -> this just removes an empty cgroup directory
.profile.speedpatch -> this just calls .bashrc as is customary
.bashrc.speedpatch -> mmmm how funny.
Code:
/tmp/speedpatch $ cat home/user/.bashrc.speedpatch
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
This just creates a cgroup for each interactive bash shell opened, and the cgroup directory will be the PID of the shell.
Just like I do in my desktop... to launch cpu hungry processes like kernel builds from the xterm
Of course this does nothing for processes not launched from a xterm.

Let's see what's said in the "speedpatch" thread.
Originally Posted by karam View Post
This patch addresses the problem by taking note of what the user is doing right now, and using that information to accelerate the current task, and decelerate other tasks on the system.
The user won't notice the background stuff going slower, they will just see their app working fast. The patch does this by creating multiple classes of task
-------------------------------------------
/dev/cgroup/cpu/tasks
/dev/cgroup/cpu/desktop/tasks
/dev/cgroup/cpu/applications/tasks
/dev/cgroup/cpu/applications/standby/tasks
/dev/cgroup/cpu/applications/launcher/tasks
-------------------------------------------
LOL. This "speedpatch" does nothing of what it's said in the first post!

It doesn't create any of those cgroups, and of course, it doesn't monitor anything nor moves any process to any cgroup.
It just creates a cgroup for each interactive shell, but how many processes are launched from a shell in the N900?
None. Processes are lauched by dbus from GUI actions.

So, as I said before, all processes remain under the main cgroup, and this "speedpatch" does nothing.
Unless you want to compile the kernel in your N900 or something like that

Ahhh Karam, what a naugty joker you are!

Last edited by maacruz; 2011-11-17 at 18:03.
 

The Following 16 Users Say Thank You to maacruz For This Useful Post: