lkml.org 
[lkml]   [2006]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch 0/5] [PATCH,RFC] vfs: per-superblock unused dentries list (2nd version)
    On Mon, Jun 19, 2006 at 10:27:39AM +1000, Neil Brown wrote:
    > On Monday June 19, dgc@sgi.com wrote:
    > >
    > > > I can see that shrink_dcache_sb could take a long time and should be
    > > > fixed, which should be as simple as replacing it with
    > > > shrink_dcache_parent; shrink_dcache_anon.
    > >
    > > But these are not guaranteed to reclaim all the dentries from a given
    > > superblock. Yes, they move the dentries to the LRU, but other activity in the
    > > system means that they may not get reclaimed during the subsequent calls
    > > to prune_dcache() and hence they may live beyond the unmount....
    > >
    >
    > My proposed patch earlier in this thread (I can post it again if you
    > like) addresses exactly this issue. Instead of moving dentries to the
    > global LRU, it moves them to a private LRU, and the calls prune_dcache
    > on that. So there is no room for other activity to get in the way of
    > prune_dcache doing what needs to be done.

    Ok. That sounds like it would work.


    > > > But I'm still puzzled as to why a long dcache LRU slows down
    > > > unmounting.
    > > >
    > > > Can you give more details?
    > >
    > > It's not the unmount that slows down - it's the fact that the dcache lock
    > > is held for so long that rest of the system halts for time it takes
    > > to run shrink_dcache_sb(). We've seen up to 50s to do a (touch fred; rm fred)
    > > when the LRU has grown to several million dentries and shrink_dcache_sb()
    > > is running. When this happens, it's not uncommon to see every CPU in the
    > > machine spinning on the dcache_lock...
    >
    > Definitely a problem.
    > Maybe it was hoped that the call to cond_resched_lock(&dcache_lock)
    > would avoid this, but apparently not.

    The first pass over the LRU doesn't even do that....

    > I still maintain that we should replace shrink_dcache_sb with calls to
    > shrink_dcache_anon and shrink_dcache_parent. That, together with my
    > previous patch, should fix this problem quite cleanly. If I send you
    > a combined patch against the latest -mm can you test?

    Ok. Send me the patch and I'll try to get some tests done on it...

    Cheers,

    Dave.
    --
    Dave Chinner
    Principal Engineer
    SGI Australian Software Group
    -
    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: 2006-06-19 03:03    [W:0.024 / U:2.192 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site