From: Tejun Heo <tj@kernel.org>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Roman Gushchin <guro@fb.com>, Roman Gushchin <guroan@gmail.com>,
Kernel Team <Kernel-team@fb.com>,
"cgroups@vger.kernel.org" <cgroups@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v8 0/7] freezer for cgroup v2
Date: Tue, 5 Mar 2019 09:27:32 -0800 [thread overview]
Message-ID: <20190305172711.GE50184@devbig004.ftw2.facebook.com> (raw)
In-Reply-To: <20190225155725.GA8096@redhat.com>
Hello, Oleg.
Sorry about the delay.
On Mon, Feb 25, 2019 at 04:57:25PM +0100, Oleg Nesterov wrote:
> > As long as the task is
> > guaranteed to be trapped by signal stop afterwards (and they are), we
> > likely can use them the same way. The only thing to be careful about
> > would be ensuring that we don't end up flipping group level frozen
> > state inbetween. Would something like that work?
>
> I have no idea because I do not understand what exactly do you mean ;)
Heh, sorry about that. What I meant was that we can consider a task
which is blocked in vfork wait as already frozen and that if we do so
we need to be careful so that frozen state doesn't do a flip between
vfork wait ending and the task getting parked again in a jobctl stop.
> However. Thinking more about this, I am not sure my concerns were valid.
> Yes, cg freezer can "hang" if it races with vfork(). But probably we should
> blame vfork(), not freezer.
I think we'd need to cover that ground regardless of where blame lies.
It's weird if freezing doesn't complete cuz one of the tasks messed up
while vforking.
> The problem is, even ^Z can "hang" if the foreground process does vfork()
> and the new child stops before exit/exec. Now I recall that I even tried
> to make a patch to fix this using ERESTART_RESTARTBLOCK, but had some nasty
> problems with blocked signals...
Ugh... yeah, these wait non-interruptible wait sites which can be
exposed to userspace are nasty. They end up adding a unique wait
state visible to userspace which comes with a bunch of corner cases.
> de_thread() should use freezable_schedule() in TASK_KILLABLE too. Currently
> it doesn't, but only because we have other (much more serious) problems with
> cred_guard_mutex/exec. However, this is is fine wrt cg freezer, other threads
> can't be frozen exactly because it is killable.
>
> Anything else does freezer_do_not_count() in TASK_KILLABLE and waits for
> another freezable process?
Can't find any. Hopefully, that was it?
> So it seems I have to take my words back, perhaps we can forget about
> freezable_schedule/etc.
I think it'd be great to be able to handle these if at all possible.
Thanks.
--
tejun
next prev parent reply other threads:[~2019-03-05 17:27 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 22:02 [PATCH v8 0/7] freezer for cgroup v2 Roman Gushchin
2019-02-19 22:02 ` [PATCH v8 1/7] cgroup: rename freezer.c into legacy_freezer.c Roman Gushchin
2019-02-19 22:02 ` [PATCH v8 2/7] cgroup: implement __cgroup_task_count() helper Roman Gushchin
2019-02-19 22:02 ` [PATCH v8 3/7] cgroup: protect cgroup->nr_(dying_)descendants by css_set_lock Roman Gushchin
2019-02-19 22:02 ` [PATCH v8 4/7] cgroup: cgroup v2 freezer Roman Gushchin
2019-02-20 14:42 ` Oleg Nesterov
2019-02-20 22:14 ` Roman Gushchin
2019-02-21 16:44 ` Oleg Nesterov
2019-02-19 22:02 ` [PATCH v8 5/7] kselftests: cgroup: don't fail on cg_kill_all() error in cg_destroy() Roman Gushchin
2019-02-19 22:02 ` [PATCH v8 6/7] kselftests: cgroup: add freezer controller self-tests Roman Gushchin
2019-02-19 22:02 ` [PATCH v8 7/7] cgroup: document cgroup v2 freezer interface Roman Gushchin
2019-02-20 14:37 ` [PATCH v8 0/7] freezer for cgroup v2 Oleg Nesterov
2019-02-20 22:00 ` Roman Gushchin
2019-02-21 16:29 ` Oleg Nesterov
2019-02-21 17:34 ` Tejun Heo
2019-02-22 16:34 ` Oleg Nesterov
2019-02-22 18:17 ` Tejun Heo
2019-02-25 15:57 ` Oleg Nesterov
2019-03-05 17:27 ` Tejun Heo [this message]
2019-02-21 22:43 ` Roman Gushchin
2019-02-22 17:04 ` Oleg Nesterov
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=20190305172711.GE50184@devbig004.ftw2.facebook.com \
--to=tj@kernel.org \
--cc=Kernel-team@fb.com \
--cc=cgroups@vger.kernel.org \
--cc=guro@fb.com \
--cc=guroan@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).