Re: [PATCH V2] staging: android: lowmemorykiller: imporve lmk to avoid deadlock issue

From: Dave Hansen
Date: Mon Aug 03 2015 - 10:06:41 EST


On 08/02/2015 10:53 PM, Wang, Biao wrote:
> Consider the following case:
> Task A trigger lmk with a lock held, while task B try to
> get this lock, but unfortunately B is the very culprit task lmk select to
> kill. Then B will never be killed, and A will forever select B to kill.
> Such dead lock will trigger softlock up issue.

It would be interesting to have some actual data about where this helps.
For instance, which locks does this happen on? What kind of
allocation? Also, we apparently _do_ mark a lowmemorykiller victim as
an oom victim and let them use memory reserves. Why does that not allow
the allocation to complete at least long enough to get the kill signal
to the victim?
--
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/