Re: clarification about misc controller and capacity vs. max

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

On Tue, Nov 01, 2022 at 05:03:25PM +0000, "Accardi, Kristen C" <kristen.c.accardi@xxxxxxxxx> wrote:
> So to be clear, if I have this:
> 
> /sys/fs/cgroup/misc.capacity
> some_res 10
> 
> and this:
> /sys/fs/cgroup/test
> 
> test.current will never be allowed to exceed 10.

If the capacity was initially larger than 10 and charges inside test
succeeded and then some event caused shrinking of the resource (without
synchronously preempting distributed units), then test.misc.current can
exceed the current capacity.

See the condition in misc_cg_current_show()
    if (READ_ONCE(misc_res_capacity[i]) || usage)

What the shrinking and preemption means is up to the implementation of
the particular miscresource.

IOW sum of 1st level children's .current may overrun capacity,
semantics is not defined by the misc controller (but it'd reject new
charges in such a situation).

(That's just for completeness. I understood from the rest that you
rather want to disable capacity checking.)

HTH,
Michal

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux