lkml.org 
[lkml]   [2010]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 06/17] fs: icache lock lru/writeback lists
On Wed, Sep 29, 2010 at 09:52:40PM -0700, Andrew Morton wrote:
> On Wed, 29 Sep 2010 22:18:38 +1000 Dave Chinner <david@fromorbit.com> wrote:
>
> > The inode moves between different lists protected by the inode_lock. Introduce
> > a new lock that protects all of the lists (dirty, unused, in use, etc) that the
> > inode will move around as it changes state. As this is mostly a list for
> > protecting the writeback lists, name it wb_inode_list_lock and nest all the
> > list manipulations in this lock inside the current inode_lock scope.
>
> All those spin_trylock()s are real ugly. They're unexplained in the
> changelog and unexplained in code comments.
>
> I'd suggest that each such site have a comment explaining why we're
> resorting to this.

They're really a side effect of how I'm building up the locking in steps
and then streamlining it in steps. Most of them disappear or get much
improved as inode removal, rcu, etc greatly help with lock ordering.

The intermediate steps are not supposed to be so pretty, so much as an
easily verifiable "ok, we have enough locking to cover what inode_lock
used to be protecting".



\
 
 \ /
  Last update: 2010-10-16 09:57    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site