From: Roman Gushchin <guro@fb.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Roman Gushchin <guroan@gmail.com>, Tejun Heo <tj@kernel.org>,
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 4/7] cgroup: cgroup v2 freezer
Date: Wed, 20 Feb 2019 22:14:29 +0000 [thread overview]
Message-ID: <20190220221423.GA17163@castle.DHCP.thefacebook.com> (raw)
In-Reply-To: <20190220144202.GB9477@redhat.com>
On Wed, Feb 20, 2019 at 03:42:02PM +0100, Oleg Nesterov wrote:
> On 02/19, Roman Gushchin wrote:
> >
> > @@ -2065,6 +2066,7 @@ static void ptrace_stop(int exit_code, int why, int clear_code, kernel_siginfo_t
> > preempt_disable();
> > read_unlock(&tasklist_lock);
> > preempt_enable_no_resched();
> > + cgroup_enter_stopped();
> > freezable_schedule();
> > } else {
> > /*
> > @@ -2243,6 +2245,7 @@ static bool do_signal_stop(int signr)
> > }
> >
> > /* Now we don't run again until woken by SIGCONT or SIGKILL */
> > + cgroup_enter_stopped();
> > freezable_schedule();
> > return true;
>
> Please see my reply to 0/7.
Answered in that thread.
>
> > @@ -2280,7 +2286,8 @@ static void do_jobctl_trap(void)
> > !(signal->flags & SIGNAL_STOP_STOPPED))
> > signr = SIGTRAP;
> > WARN_ON_ONCE(!signr);
> > - ptrace_do_notify(signr, signr | (PTRACE_EVENT_STOP << 8),
> > + ptrace_do_notify(signr,
> > + signr | (PTRACE_EVENT_STOP << 8),
> > CLD_STOPPED);
>
> white-space cleanup?
Sorry, a bogus change. Please, ignore it.
>
> > @@ -2363,7 +2419,8 @@ bool get_signal(struct ksignal *ksig)
> > * we should notify the parent, prepare_signal(SIGCONT) encodes
> > * the CLD_ si_code into SIGNAL_CLD_MASK bits.
> > */
> > - if (unlikely(signal->flags & SIGNAL_CLD_MASK)) {
> > + if (unlikely(signal->flags & SIGNAL_CLD_MASK) &
> > + !(current->jobctl & JOBCTL_TRAP_FREEZE)) {
>
> Hmm, why?
If a process is going from the stopped to the frozen state, it looks like
it's better to delay parent's notification up to the moment when it will
actually run.
Thanks!
next prev parent reply other threads:[~2019-02-20 22:15 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 [this message]
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
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=20190220221423.GA17163@castle.DHCP.thefacebook.com \
--to=guro@fb.com \
--cc=Kernel-team@fb.com \
--cc=cgroups@vger.kernel.org \
--cc=guroan@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.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
all inboxes | Powered by JetHome®