Linux cgroups development
 help / color / mirror / Atom feed
From: "Michal Koutný" <mkoutny-IBi9RG/b67k@public.gmane.org>
To: "Accardi,
	Kristen C"
	<kristen.c.accardi-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
	<tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	"hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org"
	<hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>,
	"lizefan.x-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org"
	<lizefan.x-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>,
	"cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: clarification about misc controller and capacity vs. max
Date: Wed, 2 Nov 2022 19:19:02 +0100	[thread overview]
Message-ID: <20221102181902.GA25267@blackbody.suse.cz> (raw)
In-Reply-To: <14c21f13ebbcdbd0ea4f75b7fff790b31a05a5aa.camel-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1070 bytes --]

Hello.

On Tue, Nov 01, 2022 at 05:03:25PM +0000, "Accardi, Kristen C" <kristen.c.accardi-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> 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 #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      parent reply	other threads:[~2022-11-02 18:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-01 16:40 clarification about misc controller and capacity vs. max Accardi, Kristen C
     [not found] ` <2f7b7d6b10bdcbc9a73ea449d3636575124afa25.camel-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2022-11-01 16:54   ` tj-DgEjT+Ai2ygdnm+yROfE0A
     [not found]     ` <Y2FPSqOaQGnISvXu-NiLfg/pYEd1N0TnZuCh8vA@public.gmane.org>
2022-11-01 17:03       ` Accardi, Kristen C
     [not found]         ` <14c21f13ebbcdbd0ea4f75b7fff790b31a05a5aa.camel-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2022-11-01 17:05           ` tj-DgEjT+Ai2ygdnm+yROfE0A
     [not found]             ` <Y2FR6SYazbxyK5nj-NiLfg/pYEd1N0TnZuCh8vA@public.gmane.org>
2022-11-01 17:11               ` Accardi, Kristen C
     [not found]                 ` <f678f325b47ac64e101c0ccea54c1cd1c4ea4206.camel-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2022-11-01 17:35                   ` tj-DgEjT+Ai2ygdnm+yROfE0A
2022-11-02 18:19           ` Michal Koutný [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221102181902.GA25267@blackbody.suse.cz \
    --to=mkoutny-ibi9rg/b67k@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
    --cc=kristen.c.accardi-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=lizefan.x-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org \
    --cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox