lkml.org 
[lkml]   [2010]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/18] fs: Implement lazy LRU updates for inodes.
On Wed, Oct 13, 2010 at 09:32:13AM -0400, Christoph Hellwig wrote:
> > */
> > redirty_tail(inode);
> > - } else if (atomic_read(&inode->i_count)) {
> > - /*
> > - * The inode is clean, inuse
> > - */
> > - list_move(&inode->i_list, &inode_in_use);
> > } else {
> > - /*
> > - * The inode is clean, unused
> > - */
> > - list_move(&inode->i_list, &inode_unused);
> > + /* The inode is clean */
> > + list_del_init(&inode->i_list);
> > + inode_lru_list_add(inode);
>
> Just noticed this when reviewing a later patch: why do we lose the
> i_count check here? There's no point in adding an inode that is still
> in use onto the LRU - we'll just remove it again once we find it
> during LRU scanning.

Good catch. iput_final() moves the inode onto the LRU only if
it is clean, so really only clean, unused inodes need to be added to
the LRU here. Fixed.

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com


\
 
 \ /
  Last update: 2010-10-16 02:13    [W:0.250 / U:0.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site