Re: [PATCH 13/18] fs: split locking of inode writeback and LRU lists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 08, 2010 at 04:18:16AM -0400, Christoph Hellwig wrote:
> On Fri, Oct 08, 2010 at 07:00:18PM +1100, Dave Chinner wrote:
> > > >  
> > > > -		if (inode->i_state & (I_NEW | I_WILL_FREE)) {
> > > > +		if (inode->i_state & (I_NEW | I_WILL_FREE | I_FREEING)) {
> > > >  			requeue_io(inode);
> > > >  			continue;
> > > >  		}
> > > 
> > > What does this have to do with the rest of the patch?
> > 
> > That's because there's now a window between setting I_FREEING and taking
> > the inode off the writeback list which means that we can see inodes
> > in that state here. Generally it means that the code setting
> > I_FREEING is spinning waiting for the wb->b_lock that this thread
> > currently holds so it can be removed from the list.. Hence the requeue
> > to move the inode out of the way and keep processing inodes for
> > writeback.
> 
> That needs some documentation both in the changelog and in the code
> I think.

This is another instance where the irregular i_lock locking is making
these little subtleties to the locking. I think that is actually much
worse for maintainence/complexity than a few trylocks which can be
mostly removed with rcu anyway (which are obvious because of the well
documented lock order).


--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux