public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
From: Luiz Capitulino <luizcap@amazon.com>
To: "Michal Koutný" <mkoutny@suse.com>
Cc: tj@kernel.org, lizefan.x@bytedance.com, hannes@cmpxchg.org,
	cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
	longman@redhat.com, lcapitulino@gmail.com
Subject: Re: [PATH v2] cgroup: add cgroup_favordynmods= command-line option
Date: Thu, 7 Sep 2023 14:57:33 -0400	[thread overview]
Message-ID: <542553d6-5e52-5d2a-66db-9c3b409de01b@amazon.com> (raw)
In-Reply-To: <zqgnootbsjyj7wq5ayiallz4m2bz7ad6w67t24peglhc5v6ern@4pfqlshgpnie>

[Resending, looks like I'm having issues with my mail server]

On 2023-09-07 11:57, Michal Koutný wrote:
> On Thu, Sep 07, 2023 at 11:16:41AM -0400, Luiz Capitulino <luizcap@amazon.com> wrote:
>> Yeah, this works for cgroup v2 but my understanding is that cgroup v1
>> doesn't support changing flags in remount, take a look at
>> cgroup1_reconfigure().
> 
> Ah, didn't notice.
> Alhtough -- there seems to be a deeper issue -- the mount option doesn't
> have a per-root semantics. There is only a single
> cgroup_threadgroup_rwsem afterall.
> 
> Even with your cmdline option, you may loose the behavior after
> unmounting any of the v1 hierarchies (cgroup_destroy_root()
> unconditionally disables it).

Good point. I haven't checked this in detail yet, but if
CONFIG_CGROUP_FAVOR_DYNMODS has the same behavior then I wouldn't worry
much about this. Also, I don't know how common it is to unmount and
mount a cgroup hierarchies (if it's not so common then it's even
less important).

We could also investigate on how to make the flag stick as a follow
up work on this.

> 
> Or you could still achieve the result by mounting cgroup2 hierarchy with
> favordynmods. (And unmount it, default root is not ever released.)
> 
> Maybe it would be the best to have this controllable only via v2
> hierarchy (as it's the only documented).
> (And maybe v1s should not show the option at all.)

The main motivation for this patch is really v1 since we can
simply remount v2 with favordynmods enabled (although we do
find this very useful for v2 as well).

Another crazy idea (based on your suggestion to allow only this
controllable in v2), would be to make favordynmods enabled by
default in v1 w/ the rationale that new behavior changes affect
only v2.

- Luiz

  reply	other threads:[~2023-09-07 18:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06  0:57 [PATH v2] cgroup: add cgroup_favordynmods= command-line option Luiz Capitulino
     [not found] ` <20230906005712.66461-1-luizcap-vV1OtcyAfmbQT0dZR+AlfA@public.gmane.org>
2023-09-06  1:53   ` Waiman Long
2023-09-06  6:58   ` Kamalesh Babulal
2023-09-06 12:59     ` Waiman Long
2023-09-07  9:51       ` [External] : " Kamalesh Babulal
2023-09-07 18:47         ` Luiz Capitulino
     [not found]           ` <e7675405-c910-340e-0679-0271dff76722-vV1OtcyAfmbQT0dZR+AlfA@public.gmane.org>
2023-09-08  7:04             ` Kamalesh Babulal
2023-09-07 15:06 ` Michal Koutný
2023-09-07 15:16   ` Luiz Capitulino
2023-09-07 15:57     ` Michal Koutný
2023-09-07 18:57       ` Luiz Capitulino [this message]
     [not found] ` <29bdb453-c6e3-a047-1f27-e9656da92301@amazon.com>
2023-09-18 17:47   ` Tejun Heo
     [not found]     ` <ZQiNIWQe7spOwjil-NiLfg/pYEd1N0TnZuCh8vA@public.gmane.org>
2023-09-19 11:00       ` Michal Koutný
2023-09-19 13:42         ` Luiz Capitulino

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=542553d6-5e52-5d2a-66db-9c3b409de01b@amazon.com \
    --to=luizcap@amazon.com \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=lcapitulino@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan.x@bytedance.com \
    --cc=longman@redhat.com \
    --cc=mkoutny@suse.com \
    --cc=tj@kernel.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