lkml.org 
[lkml]   [2019]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v8 4/7] cgroup: cgroup v2 freezer
On 02/20, Roman Gushchin wrote:
>
> On Wed, Feb 20, 2019 at 03:42:02PM +0100, Oleg Nesterov wrote:
> > On 02/19, Roman Gushchin wrote:
> > >
> > > @@ -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.

Perhaps I missed something but I do not understand why it is really better,
at least why it deserves this (small but still) complication...

OK, if nothing else, suppose that SIGCONT races with cgroup_do_freeze(true).
With or without this change CLD_CONTINUED can be reported or not depending
on /dev/random, do we really care?

Oleg.

\
 
 \ /
  Last update: 2019-02-21 17:45    [W:0.051 / U:3.844 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site