Re: VM Problems in 2.6.7 (Too active OOM Killer)
From: William Lee Irwin III
Date: Fri Aug 13 2004 - 17:25:04 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.
On Wed, Jul 14, 2004 at 07:44:47PM -0700, William Lee Irwin III wrote:
> 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.
I have a testcase that panics in mm/oom_kill.c (no processes left) on
several kinds of machines with weaker memory consistency, but does not
on x86-64. I suspect it is related to lack of task->flags atomicity.
-- 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/