Re: [RFC] oom-kill: give the dying task a higher priority

From: David Rientjes
Date: Tue Jun 01 2010 - 14:36:28 EST


On Tue, 1 Jun 2010, Minchan Kim wrote:

> Secondly, as Kame pointed out, we have to raise whole thread's
> priority to kill victim process for reclaiming pages. But I think it
> has deadlock problem.

Agreed, this has the potential to actually increase the amount of time for
an oom killed task to fully exit: the exit path takes mm->mmap_sem on exit
and if that is held by another thread waiting for the oom killed task to
exit (i.e. reclaim has failed and the oom killer becomes a no-op because
it sees an already killed task) then there's a livelock. That's always
been a problem, but is compounded with increasing the priority of a task
not holding mm->mmap_sem if the thread holding the writelock actually
isn't looking for memory but simply doesn't get a chance to release
because it fails to run.
--
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/