Re: 3.9.0 + CONFIG_X86_INTEL_PSTATE=y -> ThinkPad T420 with i5 lostACPI functionality

From: Dirk Brandewie
Date: Mon May 13 2013 - 13:57:46 EST


On 05/13/2013 10:20 AM, Toralf FÃrster wrote:
On 05/13/2013 06:43 PM, Dirk Brandewie wrote:
I spent some more time looking for a solution to this you can get same
behavior
by setting a config option in BOINC "Use at most X % CPU time"

yes - that's true. But BOINC is just an example.

If "nice -19 <loooong running background job" is nowadays so uncommon,
then I'm just curious what's the modern (easy) way of doing that ?


I believe using CGROUP's is the right answer for limiting this type
of load.

I have not tested it but from reading:
Documentation/scheduler/sched-design-CFS.txt
https://wiki.archlinux.org/index.php/Cgroups

You should be able to do something like the following:

cd /sys/fs/cgroup/cpu
mkdir bonic
echo 400 > boinc/cpu.shares
boinc &
echo $! > boinc/tasks

Should limit the boinc group to ~40% of the cpu.

WARNING completely untested YMMV

--Dirk
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/