login
Header Space

 
 

Re: [-mm][PATCH 3/4] Add rlimit controller accounting and control

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Balbir Singh <balbir@...>
Cc: <linux-mm@...>, Sudhir Kumar <skumar@...>, YAMAMOTO Takashi <yamamoto@...>, <lizf@...>, <linux-kernel@...>, David Rientjes <rientjes@...>, Pavel Emelianov <xemul@...>, Andrew Morton <akpm@...>, KAMEZAWA Hiroyuki <kamezawa.hiroyu@...>
Date: Tuesday, May 6, 2008 - 11:29 pm

On Sat, May 3, 2008 at 2:38 PM, Balbir Singh <balbir@linux.vnet.ibm.com> wrote:

The basic idea of the patches looks fine (apart from some
synchronization issues) but Is calling this the "rlimit" controller a
great idea? That implies that it handles all (or at least many) of the
things that setrlimit()/getrlimit() handle.

While some of the other rlimit things definitely do make sense as
cgroup controllers, putting them all in the same controller doesn't
really - paying for the address-space tracking overhead just to get,
say, the equivalent of RLIMIT_NPROC (max tasks) isn't a great idea.

Can you instead give this a name that somehow refers to virtual
address space limits, e.g. "va" or "as". That would still fit if you
expanded it to deal with locked virtual address space limits too.

I think that an "rlimit" controller would probably be best for
representing just those limits that don't really make sense when
aggregated across different tasks, but apply separately to each task
(e.g. RLIMIT_FSIZE, RLIMIT_CORE, RLIMIT_NICE, RLIMIT_NOFILE,
RLIMIT_RTPRIO, RLIMIT_STACK, RLIMIT_SIGPENDING, and maybe RLIMIT_CPU),
in order to provide an easy way to change these limits on a group of
running tasks.

On a separate note for the address-space tracking, ideally the
subsystem would track whether or not it was bound to a hierarchy, and
skip charging/uncharging if not. That way there's no (noticeable)
overhead for compiling in the subsystem but not using it. At the point
when the subsystem was bound to a hierarchy, it could at that point
run through all mms and charge each one's existing address space to
the appropriate cgroup. (Currently that would only be the root cgroup
in the hierarchy).

Paul
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[-mm][PATCH 0/4] Add rlimit controller to cgroups (v3), Balbir Singh, (Sat May 3, 5:37 pm)
Re: [-mm][PATCH 0/4] Add rlimit controller to cgroups (v3), KAMEZAWA Hiroyuki, (Tue May 6, 9:09 pm)
[-mm][PATCH 4/4] Add rlimit controller documentation, Balbir Singh, (Sat May 3, 5:38 pm)
Re: [-mm][PATCH 3/4] Add rlimit controller accounting and co..., Paul Menage, (Tue May 6, 11:29 pm)
[-mm][PATCH 1/4] Setup the rlimit controller, Balbir Singh, (Sat May 3, 5:37 pm)
Re: [-mm][PATCH 1/4] Setup the rlimit controller, Li Zefan, (Mon May 5, 9:31 pm)
Re: [-mm][PATCH 1/4] Setup the rlimit controller, Balbir Singh, (Tue May 6, 4:15 am)
Re: [-mm][PATCH 1/4] Setup the rlimit controller, Andrew Morton, (Mon May 5, 6:11 pm)
Re: [-mm][PATCH 1/4] Setup the rlimit controller, Balbir Singh, (Mon May 5, 11:40 pm)
speck-geostationary