Messages in this thread | ![/](/images/icornerl.gif) | | Date | Thu, 1 Apr 2010 11:58:20 -0700 (PDT) | From | David Rientjes <> | Subject | Re: [patch] oom: give current access to memory reserves if it has been killed |
| |
On Thu, 1 Apr 2010, Oleg Nesterov wrote:
> > --- a/mm/oom_kill.c > > +++ b/mm/oom_kill.c > > @@ -459,7 +459,7 @@ static int oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order, > > * its children or threads, just set TIF_MEMDIE so it can die quickly > > */ > > if (p->flags & PF_EXITING) { > > - __oom_kill_task(p); > > + set_tsk_thread_flag(p, TIF_MEMDIE); > > So, probably this makes sense anyway but not strictly necessary, up to you. >
It matches the already-existing comment that only says we need to set TIF_MEMDIE so it can quickly exit rather than call __oom_kill_task(), so it seems worthwhile.
> > if (fatal_signal_pending(current)) { > > - __oom_kill_task(current); > > + set_tsk_thread_flag(current, TIF_MEMDIE); > > Yes, I think this fix is needed. >
Ok, I'll add your acked-by and send this to Andrew with a follow-up that consolidates __oom_kill_task() into oom_kill_task(), thanks.
| ![\](/images/icornerr.gif) |