Re: VM Problems in 2.6.7 (Too active OOM Killer)

From: William Lee Irwin III
Date: Wed Jul 14 2004 - 21:46:02 EST


On Wed, Jul 14, 2004 at 07:39:51PM -0700, William Lee Irwin III wrote:
> Careful not to make too much of ignoring signals, mm/oom_kill.c sets
> PF_MEMDIE out-of-context, so when an OOM kill is issued while a task
> is looping in __alloc_pages() it will eventually break out of the
> rebalance loop due to the flag.

However, note the modifications of task->flags are not atomic. In
principle, one may have:

__alloc_pages() __oom_kill_task()
load current->flags load current->flags
|= PF_MEMALLOC in registers |= PF_MEMALLOC|PF_MEMDIE in registers
IRQ/delay/whatever store current->flags
store current->flags ...
try_to_free_pages() etc. force_sig() etc.

... and voila! PF_MEMDIE in ->flags has been lost.


-- wli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/