OpenVZ Forum


Home » Mailing lists » Devel » Re: Loadable cgroup subsystems
Re: Loadable cgroup subsystems [message #29174] Tue, 08 April 2008 05:43 Go to next message
Paul Menage is currently offline  Paul Menage
Messages: 642
Registered: September 2006
Senior Member
On Mon, Apr 7, 2008 at 10:39 PM, Nikanth Karthikesan <knikanth@suse.de> wrote:
>
>  Why not provide a interface to add subsystems at run-time instead?
>  Are there any reason for not letting a subsystem to be implemented as a
>  loadable module? IOW make cgroups usable by modules?
>

Having all the subsystems declared at compile time makes a lot of
things (number of subsystems, size of css_set, etc) statically known,
which makes the code clearer and more importantly eliminates a bunch
of locking/synchronization overhead.

It would be possible to make cgroups support dynamically-loaded
subsystems, and in fact, some of the earliest cgroups patches did
support this, for a predefined max number of subsystems. But it would
introduce more complexity and overhead.

I'd rather not add support for this without a strong case of a
subsystem that really needs to be dynamically loaded.

Paul
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: Loadable cgroup subsystems [message #29181 is a reply to message #29174] Tue, 08 April 2008 09:07 Go to previous message
Balbir Singh is currently offline  Balbir Singh
Messages: 491
Registered: August 2006
Senior Member
Paul Menage wrote:
> On Mon, Apr 7, 2008 at 10:39 PM, Nikanth Karthikesan <knikanth@suse.de> wrote:
>>  Why not provide a interface to add subsystems at run-time instead?
>>  Are there any reason for not letting a subsystem to be implemented as a
>>  loadable module? IOW make cgroups usable by modules?
>>
> 
> Having all the subsystems declared at compile time makes a lot of
> things (number of subsystems, size of css_set, etc) statically known,
> which makes the code clearer and more importantly eliminates a bunch
> of locking/synchronization overhead.
> 
> It would be possible to make cgroups support dynamically-loaded
> subsystems, and in fact, some of the earliest cgroups patches did
> support this, for a predefined max number of subsystems. But it would
> introduce more complexity and overhead.
> 
> I'd rather not add support for this without a strong case of a
> subsystem that really needs to be dynamically loaded.
> 

I agree with most of what you just said. The biggest advantage I see of dynamic
modules is that they can be unloaded/loaded on demand. The biggest disadvantage
is that they come in much later after system initialization and might not be
fully aware of the state of the system when the specific controller is loaded.
It is trade-off, we need to see if it is worth doing.

-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Previous Topic: [PATCH -mm 2/3] cgroup: simplify init_subsys() (v2)
Next Topic: Loadable cgroup subsystems
Goto Forum:
  


Current Time: Sat Jun 21 07:17:01 GMT 2025

Total time taken to generate the page: 0.07702 seconds