Hello,
On Wed, Mar 03, 2021 at 10:12:32PM -0800, Vipin Sharma wrote:
> Right now there is no API for the caller to know total usage, unless they
> keep their own tally, I was thinking it will be useful to add one more API
>
> unsigned long misc_cg_res_total_usage(enum misc_res_type type)
>
> It
On Wed, Mar 03, 2021 at 10:42:37AM -0500, Tejun Heo wrote:
> > + atomic_t usage;
> > +};
>
> Can we do 64bits so that something which counts memory can use this too?
>
Sure.
> > +
> > + if (usage > capacity)
> > + return -EBUSY;
>
> I'd rather go with allowing brin
Hello,
On Tue, Mar 02, 2021 at 12:17:04AM -0800, Vipin Sharma wrote:
> +/**
> + * struct misc_res: Per cgroup per misc type resource
> + * @max: Maximum count of the resource.
> + * @usage: Current usage of the resource.
> + */
> +struct misc_res {
> + unsigned int max;
> + atomic_t usage;
The Miscellaneous cgroup provides the resource limiting and tracking
mechanism for the scalar resources which cannot be abstracted like the
other cgroup resources. Controller is enabled by the CONFIG_CGROUP_MISC
config option.
The first two resources added to the miscellaneous controller are Secur
4 matches
Mail list logo