lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 16 Oct 2010 11:11:03 +1100
From:	Dave Chinner <david@...morbit.com>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [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@...morbit.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ