Re: [PATCH 1/2] cgroup allow subsys to set default mode of its own file

From: KAMEZAWA Hiroyuki
Date: Thu Feb 26 2009 - 19:40:07 EST


On Thu, 26 Feb 2009 16:28:11 -0800
Paul Menage <menage@xxxxxxxxxx> wrote:

> On Thu, Feb 26, 2009 at 1:00 PM, Andrew Morton
> <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> > On Wed, 25 Feb 2009 16:35:55 +0900
> > KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:
> >
> >> When I wrote tools for maintain cgroup, I can't find which file is
> >> writable intarfece or not via cgroup file systems. (finally, I did
> >> dirty approach.)
> >> IMHO, showing "this file is read-only" in explicit way is useful
> >> for user-land (tools). In other story, a file whose name sounds read-only
> >> may have "trigger" operation and support reseting. In this case,
> >> "writable" is informative.
> >
> > Well, we have compatibility issues here. If we make this change, and
> > people write tools which depend upon that change then those tools might
> > break when run upon older kernels.
>
> I don't think that's too big a deal - a write can always fail at the
> whim of a cgroups subsystem, so this would just be a hint to a tool
> that it shouldn't even bother trying to write to the file. It should
> be able to handle a failure.
>
> But I don't see why we can't figure out the mode automatically based
> on whether or not there's a write handler defined for the control
> file.
>
That's because I wanted to allow -w------- or -w--w---- or some

Thanks,
-Kame



> Paul
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/