lkml.org 
[lkml]   [2012]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH] shrink_dcache_parent() deadlock
From
On Tue, Jan 10, 2012 at 5:00 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> On Tue, Jan 10, 2012 at 2:05 AM, Miklos Szeredi <miklos@szeredi.hu> wrote:
>>
>> I tested Dave's patch and the bug can still be easily reproduced.
>>
>> And that's to be expected, as the intermediate "being on the lru"
>> state that Dave's patch eliminates doesn't play a fundamental part in
>> the mechanism of the livelock.  It does eliminate one trylock, but
>> that's not the one critical to this bug (removing it is a very good
>> idea anyway).
>>
>> The critical trylock here is the one in dentry_kill() which tries to
>> lock the parent.
>
> Ok. Here's your patch munged for current -git. You've got most of a
> changelog, can you send this out with the right subject and a
> sign-off, and re-test with the current git just to make sure.

See the one with the subject "vfs: fix shrink_dcache_parent()
livelock" I sent out a bit earlier.

You didn't quite get it right: the flag now needs to be set in
select_parent() not prune_dcache_sb().

I think prune_dcache_sb() doesn't need this logic (although it
wouldn't hurt either) because that one is called from the slab
shrinkers and those are protected from being run multiple times in
parallel, I hope.

Thanks,
Miklos
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-01-10 17:25    [W:0.147 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site