[Devel] Re: [ckrm-tech] [PATCH 3/9] Containers (V9): Add tasks file interface

Srivatsa Vaddagiri vatsa at in.ibm.com
Tue May 1 20:46:28 PDT 2007


On Tue, May 01, 2007 at 08:25:35PM -0700, Paul Menage wrote:
> >        - Walk the task table and find relevant members
> 
> That doesn't seem like a terrible solution to me, unless you expect
> the class limit to be changing incredibly frequently.

yeah i agree. Group limit(s) should not be changing so frequently.

> >          perhaps
> >        - Move p->load_weight to a class structure
> 
> Sounds like a good idea if you can do it - but if it's per-process,
> how would it fit in the class structure?

p->load_weight essentially depends on two things:

	- nice value or static priority (which is per process, already present 
	  in task_struct)
	- class limit (which is per class)

So in theory we can eliminate the load_weight field in task_struct and
compute it at runtime from the above two fields, although it will be
slightly inefficient I guess to compute the value every time a task is
added to the runqueue. If that is not desirable, then we can stick with
option 1 (walk task list and change member task's->load_weight upon class
limit change).

-- 
Regards,
vatsa




More information about the Devel mailing list