Re: cgroup information proc file format

From: Serge E. Hallyn
Date: Thu Oct 06 2011 - 08:50:50 EST


Quoting Glauber Costa (glommer@xxxxxxxxxxxxx):
> On 10/04/2011 06:05 PM, Serge Hallyn wrote:
> >Quoting Glauber Costa (glommer@xxxxxxxxxxxxx):
> >...
> >
> >>>Can't we just introduce the
> >>>/sys/fs/cgroup/memory/memory.proc etc files, and have the procfs code,
> >>>if cgroups are enabled and the task's memory cgroup != '/', return
> >>>the data from that file?
> >>
> >>First: If we're doing that, why do we need that file in the first place?
> >
> >We might not :) But we might, if we want to offer containers a choice of
> >whether /proc/meminfo is the host's or the container's.
>
> Hi,
>
> Please allow me to clarify some points so we are in the same page
> (thus avoiding fragmentation =p )
>
> Are you quoting /proc/meminfo as an example only, or are you
> concerned specifically with this file? I myself am talking about
> proc files in general.

An example. But as we are talking in terms of cgroups, I assumed this
was only about procfiles representing resources affected by cgroups -
like /proc/cpuinfo, /proc/meminfo, /proc/devices...

...

> Correct me if I am wrong, but it seems to me now that we agree that
> there should be a mechanism determining whether or not to
> automatically show cgroup-restrained values in proc files.

Agreed.

...

> BTW, A file in each cgroup:
>
> /sys/fs/cgroup/memory/memory.restrict_proc_data (or any other name)
> /sys/fs/cgroup/cpu/cpu.restrict_proc_data (or any other name)
> etc...
>
> works for me as well.

Cool.

-serge
--
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/