Re: [PATCH 10 of 16] stop useless vm trashing while we wait the TIF_MEMDIE task to exit

Andrea Arcangeli
2007-06-09T01:59:44Z

On Fri, Jun 08, 2007 at 02:48:15PM -0700, Christoph Lameter wrote:
> On Fri, 8 Jun 2007, Andrea Arcangeli wrote:
>
> > There's no point in trying to free memory if we're oom.
>
> OOMs can occur because we are in a cpuset or have a memory policy that
> restricts the allocations. So I guess that OOMness is a per node property
> and not a global one.

I'm sorry to inform you that the oom killing in current mainline has
always been a global event not a per-node one, regardless of the fixes
I just posted.

if (test_tsk_thread_flag(p, TIF_MEMDIE))
return ERR_PTR(-1UL);
[..]
if (PTR_ERR(p) == -1UL)
goto out;

Best would be for you to send me more changes at the end of the
patchbomb so that for that the first time _ever_, the oom will become
a per-node event and not a global one anymore.

Said that it's not entirely obvious to me, that it makes any sense to
disrupt functionality instead of just running slower but safely (I
would generally prefer printk a warning instead of killing a task if
we've to override the restriction on the memory policy). But that's
your call, I'm fine either ways...

Thanks!