Re: [RFC PATCH 4/4] cgroups: Add an rlimit subsystem

From: Aditya Kali
Date: Tue Jun 28 2011 - 14:10:59 EST


Frederic Weisbecker <fweisbec <at> gmail.com> writes:
> +struct rlim {
> + struct res_counter proc_counter;
> + struct cgroup_subsys_state css;
> +};
This can be used to enforce limits on FDs (RLIMIT_NOFILE), TCP/UDP ports,
locked memory, queued data on sockets, etc. How making proc_counter an
array (currently of size 1) ? Though with this patch there is just one, but it
will great to have ready support for easily adding more.

> +static struct cftype cft_max_proc = {
> + .name = "max_proc",
> + .read_u64 = max_proc_read_u64,
> + .write_u64 = max_proc_write_u64,
> +};
How about exporting USAGE, MAX_USAGE and FAILCNT too? These are useful
for resource estimation.


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