[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKOZuevzE=0Oa8gn--rkVJ8t69S+o2vK--pki65XXg6EVuOhMQ@mail.gmail.com>
Date: Wed, 11 Mar 2020 10:46:15 -0700
From: Daniel Colascione <dancol@...gle.com>
To: Tejun Heo <tj@...nel.org>
Cc: Marco Ballesio <balejs@...gle.com>, Roman Gushchin <guro@...com>,
cgroups@...r.kernel.org,
linux-kernel <linux-kernel@...r.kernel.org>, lizefan@...wei.com,
Johannes Weiner <hannes@...xchg.org>,
Jonathan Corbet <corbet@....net>, rjw@...ysocki.net,
Pavel Machek <pavel@....cz>, len.brown@...el.com,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
linux-pm@...r.kernel.org, Minchan Kim <minchan@...gle.com>,
Suren Baghdasaryan <surenb@...gle.com>
Subject: Re: [PATCH] cgroup-v1: freezer: optionally killable freezer
On Tue, Mar 3, 2020 at 5:48 AM Tejun Heo <tj@...nel.org> wrote:
>
> Hello,
>
> On Wed, Feb 19, 2020 at 10:32:31AM -0800, Marco Ballesio wrote:
> > @@ -94,6 +94,18 @@ The following cgroupfs files are created by cgroup freezer.
> > Shows the parent-state. 0 if none of the cgroup's ancestors is
> > frozen; otherwise, 1.
> >
> > +* freezer.killable: Read-write
> > +
> > + When read, returns the killable state of a cgroup - "1" if frozen
> > + tasks will respond to fatal signals, or "0" if they won't.
> > +
> > + When written, this property sets the killable state of the cgroup.
> > + A value equal to "1" will switch the state of all frozen tasks in
> > + the cgroup to TASK_INTERRUPTIBLE (similarly to cgroup v2) and will
> > + make them react to fatal signals. A value of "0" will switch the
> > + state of frozen tasks to TASK_UNINTERRUPTIBLE and they won't respond
> > + to signals unless thawed or unfrozen.
>
> As Roman said, I'm not too sure about adding a new cgroup1 freezer
> interface at this point. If we do this, *maybe* a mount option would
> be more minimal?
I'd still prefer a cgroup flag. A mount option is a bigger
compatibility risk and isn't really any simpler than another cgroup
flag. A mount option will affect anything using the cgroup mount
point, potentially turning non-killable frozen processes into killable
ones unexpectedly. (Sure, you could mount multiple times, but only one
location is canonical, and that's the one that's going to get the flag
flipped.) A per-cgroup flag allows people to opt into the new behavior
only in specific contexts, so it's safer.
Powered by blists - more mailing lists