lkml.org 
[lkml]   [2013]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: oom-kill && frozen()
On 11/13, Peter Zijlstra wrote:
>
> On Wed, Nov 13, 2013 at 06:07:24PM +0100, Oleg Nesterov wrote:
> > 4. Finally, change try_to_wake_up() path to do
> >
> > - p->state = TASK_WAKING;
> > + p->state &= ~state;
> > + if (p->state & ~(TASK_DEAD | TASK_WAKEKILL | TASK_PARKED))
> > + return;
> > + else
> > + p->state = TASK_WAKING;
> >
> > IOW, if the task sleeps in, say, TASK_INTERRUPTIBLE | __TASK_FROZEN
> > then it need both try_to_wake_up(TASK_INTERRUPTIBLE) and
> > try_to_wake_up(__TASK_FROZEN) to wake up.
>
> > Tejun, Peter, do you think this makes any sense? I am just curious, but
> > "selective wakeup" looks potentially useful.
>
> I've never looked at any of this freeze stuff, so I cannot comment too
> much. However we should be very careful not to add too much to relative
> hot paths for the relative rare case of freezing stuff.

Yes, yes, sure.

Plus my description was confusing and incomplete (and I am sure I missed
something more). I forgot to mention that freeze_task() should also add
the FROZEN state if it sees FROZEN qualifier, this needs more changes.

So please forget. May be I'll _try_ to make something working (at least
for discussion), but I am not sure.

Oleg.



\
 
 \ /
  Last update: 2013-11-13 19:41    [W:0.750 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site