Messages in this thread | | | Date | Tue, 8 Jun 2010 11:26:48 -0700 (PDT) | From | David Rientjes <> | Subject | Re: [PATCH 12/12] oom: give current access to memory reserves if it has been killed |
| |
On Tue, 8 Jun 2010, KOSAKI Motohiro wrote:
> > diff --git a/mm/oom_kill.c b/mm/oom_kill.c > > index 67b5fa5..ad85e1b 100644 > > --- a/mm/oom_kill.c > > +++ b/mm/oom_kill.c > > @@ -638,6 +638,16 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, > > } > > > > /* > > + * If current has a pending SIGKILL, then automatically select it. The > > + * goal is to allow it to allocate so that it may quickly exit and free > > + * its memory. > > + */ > > + if (fatal_signal_pending(current)) { > > + set_tsk_thread_flag(current, TIF_MEMDIE); > > + return; > > + } > > Self NAK this. > We have no gurantee that current is oom killable. Oh, here is > out_of_memory(), sigh. >
We're not killing it, it's already dying. We're simply giving it access to memory reserves so it may allocate and quickly exit to free its memory. Being OOM_DISABLE does not imply the task cannot exit or use memory reserves in the exit path.
| |