All of lore.kernel.org
 help / color / mirror / Atom feed
* Loadable cgroup subsystems
@ 2008-04-08  5:39 Nikanth Karthikesan
       [not found] ` <1207633175.7798.5.camel-6V/ZMFSzLJEY2a5ovjdQkMfQ/htzPhTPEvhb3Hwu1Ks@public.gmane.org>
       [not found] ` <47FB54CC.BANGALORE.BLR.100.174746A.1.1545B.1@1:7.BANGALORE.BLR.100.0.1.0.1@16>
  0 siblings, 2 replies; 6+ messages in thread
From: Nikanth Karthikesan @ 2008-04-08  5:39 UTC (permalink / raw)
  To: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	menage-hpIqsD4AKlfQT0dZR+AlfA

> On 4/1/08, Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org> wrote:
>  > > > > --- a/include/linux/cgroup_subsys.h
>  > > > > +++ b/include/linux/cgroup_subsys.h
>  > > > > @@ -42,3 +42,9 @@ SUBSYS(mem_cgroup)
>  > > > > #endif
>  > > > >
>  > > > > /* */
>  > > > > +
>  > > > > +#ifdef CONFIG_CGROUP_DEVICE
>  > > > > +SUBSYS(devices)
>  > > > > +#endif
>  > > > > +
>  > > > > +/* */
>  > > >
>  > > > I don't know what this is, but it does not look like C...
>  > >
>  > > Huh?
>  >
>  > Empty comments as separators?
> 
>  They help when multiple people add such SUBSYS things and
>  do not have to fight rejects.
> 

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?

Thanks
Nikanth Karthikesan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Loadable cgroup subsystems
       [not found] ` <1207633175.7798.5.camel-6V/ZMFSzLJEY2a5ovjdQkMfQ/htzPhTPEvhb3Hwu1Ks@public.gmane.org>
@ 2008-04-08  5:43   ` Paul Menage
       [not found]     ` <6599ad830804072243i35e5b134q1d04f2bd121f8f69-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Menage @ 2008-04-08  5:43 UTC (permalink / raw)
  To: Nikanth Karthikesan
  Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

On Mon, Apr 7, 2008 at 10:39 PM, Nikanth Karthikesan <knikanth-l3A5Bk7waGM@public.gmane.org> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Loadable cgroup subsystems
       [not found]     ` <6599ad830804072243i35e5b134q1d04f2bd121f8f69-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2008-04-08  9:07       ` Balbir Singh
  0 siblings, 0 replies; 6+ messages in thread
From: Balbir Singh @ 2008-04-08  9:07 UTC (permalink / raw)
  To: Paul Menage
  Cc: Nikanth Karthikesan,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

Paul Menage wrote:
> On Mon, Apr 7, 2008 at 10:39 PM, Nikanth Karthikesan <knikanth-l3A5Bk7waGM@public.gmane.org> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Loadable cgroup subsystems
       [not found] ` <47FB54CC.BANGALORE.BLR.100.174746A.1.1545B.1@1:7.BANGALORE.BLR.100.0.1.0.1@16>
@ 2008-04-08  9:40   ` Nikanth Karthikesan
       [not found]     ` <1207647629.7798.40.camel-6V/ZMFSzLJEY2a5ovjdQkMfQ/htzPhTPEvhb3Hwu1Ks@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Nikanth Karthikesan @ 2008-04-08  9:40 UTC (permalink / raw)
  To: Paul Menage
  Cc: Vasily Tarasov,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

On Mon, 2008-04-07 at 22:43 -0700, Paul Menage wrote:
> On Mon, Apr 7, 2008 at 10:39 PM, Nikanth Karthikesan <knikanth-l3A5Bk7waGM@public.gmane.org> 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.
> 

true

> 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.

There were some band-width control patches based on cfq + cgroups, which
I guess will mandate cfq to be built-in?

Thanks
Nikanth Karthikesan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Loadable cgroup subsystems
       [not found]     ` <1207647629.7798.40.camel-6V/ZMFSzLJEY2a5ovjdQkMfQ/htzPhTPEvhb3Hwu1Ks@public.gmane.org>
@ 2008-04-08  9:41       ` Paul Menage
       [not found]         ` <6599ad830804080241u68d68e2bo8739f907306571bd-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Menage @ 2008-04-08  9:41 UTC (permalink / raw)
  To: Nikanth Karthikesan
  Cc: Vasily Tarasov,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

On Tue, Apr 8, 2008 at 2:40 AM, Nikanth Karthikesan <knikanth-l3A5Bk7waGM@public.gmane.org> wrote:
>  >
>  > I'd rather not add support for this without a strong case of a
>  > subsystem that really needs to be dynamically loaded.
>
>  There were some band-width control patches based on cfq + cgroups, which
>  I guess will mandate cfq to be built-in?
>

Yes, or else have built-in stubs for the cgroup subsystem that load
cfq and the code that uses cfq the first time someone tries to mount
that subsystem.

Actually, it probably wouldn't be too hard to have cgroups do that
automatically - support the concept of a stub cgroup that was known
about at compile time but wasn't active until its first bind, and have
cgroups dynamically load the relevant modules when the user tried to
mount it.

Dynamically loading subsystems that aren't even known about at compile
time would be probably a bit uglier.

Paul

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Loadable cgroup subsystems
       [not found]         ` <6599ad830804080241u68d68e2bo8739f907306571bd-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2008-04-09  8:31           ` Satoshi UCHIDA
  0 siblings, 0 replies; 6+ messages in thread
From: Satoshi UCHIDA @ 2008-04-09  8:31 UTC (permalink / raw)
  To: 'Paul Menage', 'Nikanth Karthikesan'
  Cc: 'Vasily Tarasov',
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

> >  There were some band-width control patches based on cfq + cgroups, which
> >  I guess will mandate cfq to be built-in?
> >
> 
> Yes, or else have built-in stubs for the cgroup subsystem that load
> cfq and the code that uses cfq the first time someone tries to mount
> that subsystem.
> 

I think that it is too early to decide which band-width control for
cgroups will mandate to be built-in.
Before that, we need more discussion about a band-width control and
its implementation.
I seems that both implementation are still prototype and immature.
Both implementation would have good points and bad points respectively.


If you want to manage these patchset by one source tree, we should
choice adopting means by a build option.
So, I think that a build option is the better at present, but I guess
that it should be better to dynamically load subsystem in future.

I have idea that handles multiple implementation as provisional solution.
Now, all bandwidth control expands CFQ original code and is valid by build options.
It is good to be re-implemented as new I/O scheduler which reuses original code.
Therefore, it became a selectable such as other I/O scheduler (anticipatory, cfq, noop, etc.)
User can select a suitable scheduler through "scheduler" entry in sysfs. 
In addition, it's possible to use a new controller simultaneously with existing I/O scheduler.
Unfortunately, this idea would require much modification to each patchset.

-----
Satoshi UCHIDA

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-04-09  8:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-08  5:39 Loadable cgroup subsystems Nikanth Karthikesan
     [not found] ` <1207633175.7798.5.camel-6V/ZMFSzLJEY2a5ovjdQkMfQ/htzPhTPEvhb3Hwu1Ks@public.gmane.org>
2008-04-08  5:43   ` Paul Menage
     [not found]     ` <6599ad830804072243i35e5b134q1d04f2bd121f8f69-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-04-08  9:07       ` Balbir Singh
     [not found] ` <47FB54CC.BANGALORE.BLR.100.174746A.1.1545B.1@1:7.BANGALORE.BLR.100.0.1.0.1@16>
2008-04-08  9:40   ` Nikanth Karthikesan
     [not found]     ` <1207647629.7798.40.camel-6V/ZMFSzLJEY2a5ovjdQkMfQ/htzPhTPEvhb3Hwu1Ks@public.gmane.org>
2008-04-08  9:41       ` Paul Menage
     [not found]         ` <6599ad830804080241u68d68e2bo8739f907306571bd-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-04-09  8:31           ` Satoshi UCHIDA

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.