lkml.org 
[lkml]   [2014]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: fs/dcache.c - BUG: soft lockup - CPU#5 stuck for 22s! [systemd-udevd:1667]
    On Wed, May 28, 2014 at 04:11:36PM +0300, Mika Westerberg wrote:

    > I added this on top of your previus patch and unfortunately the livelock
    > is still there :-(
    >
    > >From the previous log, it looks like udev is doing exactly same operation
    > (check_submounts_and_drop) on 4 of the CPUs in paraller:

    4 threads trying to resolve some pathnames in that subtree for some reason.
    All of them hitting ->d_revalidate() on the spot - basically, the first
    invalidated directory...

    OK, it's not ->i_lock, it's ->d_lock on parent being grabbed after that on
    child, while d_walk() keeps taking them in opposite order. Hmm...

    In principle we could do the following:
    * split dentry_kill() into the part that is taking locks and
    the rest of it.
    * in case of trylock failure have shrink_dentry_list() do
    read_seqlock_excl(&rename_lock) (which will stabilize ->d_parent) and
    take ->d_lock in the right order, drop rename_lock and call __dentry_kill().

    AFAICS, that would kill the livelock for good. We still have ->i_lock
    trylock failures to deal with, but those are less of a problem - d_walk()
    won't step on ->i_lock at all. I'm going to grab a couple of hours of sleep
    and try to put together something along those lines...


    \
     
     \ /
      Last update: 2014-05-28 17:01    [W:5.256 / U:1.808 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site