On Tue, Feb 08, 2011 at 05:05:41PM -0800, jacob.jun.pan@xxxxxxxxxxxxxxx wrote:From: Jacob Pan<jacob.jun.pan@xxxxxxxxxxxxxxx>I kept wondering how this was useful when we've got the "cpu" subsystem
Freezer subsystem is used to manage batch jobs which can start
stop at the same time. However, sometime it is desirable to let
the kernel manage the freezer state automatically with a given
duty ratio.
For example, if we want to reduce the time that backgroup apps
are allowed to run we can put them into a freezer subsystem and
set the kernel to turn them THAWED/FROZEN at given duty ratio.
This patch introduces two file nodes under cgroup
freezer.duty_ratio_pct and freezer.period_sec
Usage example: set period to be 5 seconds and frozen duty ratio 90%
[root@localhost aoa]# echo 90> freezer.duty_ratio_pct
[root@localhost aoa]# echo 5000> freezer.period_ms
because for some reason "duty cycle" made me think this was a scheduling
policy knob. In fact, I'm pretty sure it is -- it just happens to
sometimes reduce power consumption.
Have you tried using the cpu cgroup subsystem's share to see if it can
have a similar effect?