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

2015-08-03 Thread Dave Hansen
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

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

2015-08-03 Thread Joe Perches
On Mon, 2015-08-03 at 09:15 +0300, Dan Carpenter wrote: > On Mon, Aug 03, 2015 at 05:53:22AM +, 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 > >

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

2015-08-03 Thread Dan Carpenter
On Mon, Aug 03, 2015 at 09:15:56AM +0300, Dan Carpenter wrote: > > Reviewed-by: Dan Carpenter > > I don't really feel comfortable saying I reviewed this code. I just > commented on a few process issues. I don't know the subsystem well > enough to give it a seal of approval. > Biao was asking

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

2015-08-02 Thread Dan Carpenter
On Mon, Aug 03, 2015 at 05:53:22AM +, 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.

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

2015-08-02 Thread Wang, Biao
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. This patch try to p