Re: [PATCH 09 of 16] fallback killing more tasks if tif-memdie doesn't go away

Christoph Lameter
2007-06-08T21:57:07Z

On Fri, 8 Jun 2007, Andrea Arcangeli wrote:

> @@ -276,13 +272,16 @@ static void __oom_kill_task(struct task_
> if (verbose)
> printk(KERN_ERR "Killed process %d (%s)\n", p->pid, p->comm);
>
> + if (!test_and_set_tsk_thread_flag(p, TIF_MEMDIE)) {
> + last_tif_memdie_jiffies = jiffies;
> + set_bit(0, &VM_is_OOM);
> + }
> /*

You cannot set VM_is_OM here since __oom_kill_task can be called for
a process that has constrained allocations.

With this patch a user can cause an OOM by restricting access to a single
node using MPOL_BIND. Then VM_is_OOM will be set despite of lots of
available memory elsewhere.