[lkml]   [2006]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 0/4] sched: Add CPU rate caps
On Sun, Jun 18, 2006 at 08:25:02PM +1000, Peter Williams wrote:
> >People are going to want to extend this to capping a *group* of tasks, with
> >some yet-to-be-determined means of tying those tasks together. How well
> >suited is this code to that extension?
> Quite good. It can be used from outside the scheduler to impose caps on
> arbitrary groups of tasks. Were the PAGG interface available I could
> knock up a module to demonstrate this. When/if the "task watchers"

For demonstration purpose, maybe you could use tsk->uid to group tasks and
and see how capping at group level works out? Basically cap the per-user cpu

> patch is included I will try and implement a higher level mechanism
> using that. The general technique is to get an estimate of the
> "effective number" of tasks in the group (similar to load) and give each
> task in the group a cap which is the group's cap divided by the
> effective number of tasks (or the group cap whichever is smaller -- i.e.
> the effective number of tasks could be less than one).

For "effective number" do you include only runnable tasks? As and when
this number changes, you would need to go and change the per-task cap of
all tasks in the group. Any idea what the cost of that operation would
be? Or do you intend to do it lazily to amortize some of that cost?

> Doing it inside the scheduler is also doable but would have some locking
> issues. The run queue lock could no longer be used to protect the data
> as there's no guarantee that all the tasks in the group are associated
> with the same queue.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-06-18 13:45    [W:0.101 / U:4.828 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site