On Tue, May 27, 2014 at 05:00:26AM +0100, Al Viro wrote: > On Tue, May 27, 2014 at 04:14:15AM +0100, Al Viro wrote: > > > As the matter of fact, let's try this instead - retry the same sucker > > immediately in case if trylocks fail. Comments? > > Better yet, let's take "move back to shrink list" into dentry_kill() > itself. Then we get consistent locking rules for dentry_kill() and > instead of unlock_on_failure we simply pass it NULL or the shrink > list to put the sucker back. Mika, could you test this one and see > if it fixes that livelock? The difference in behaviour is that in > case of trylock failure we hit that sucker again without letting > it ride all the way around the list, same as we do for other dentry_kill() > callers. I tried this patch and unfortunately it still results the same sort of livelock. I've attached the dmesg. I also tried the serialization patch from Linus and it seemed to fix the problem. After several rounds of USB memory stick plug/unplug I haven't seen a single "soft lockup" warning in dmesg. I'm able to reproduce the problem pretty easily, so if you have something else to try I'm more than happy to give it a try.