Re: [RFC] Heuristic for inode/dentry fragmentation prevention

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

 



On Wed, Jan 03, 2018 at 01:39:27PM -0600, Christopher Lameter wrote:
> +++ linux/fs/dcache.c
> @@ -1074,7 +1074,8 @@ static enum lru_status dentry_lru_isolat
>  		return LRU_REMOVED;
>  	}
> 
> -	if (dentry->d_flags & DCACHE_REFERENCED) {
> +	if (dentry->d_flags & DCACHE_REFERENCED &&
> +	   kobjects_left_in_slab_page(dentry) > 1) {
>  		dentry->d_flags &= ~DCACHE_REFERENCED;
>  		spin_unlock(&dentry->d_lock);
> 

Maybe also update this comment:

        /*
         * Referenced dentries are still in use. If they have active
         * counts, just remove them from the LRU. Otherwise give them
-        * another pass through the LRU.
+	 * another pass through the LRU unless they are the only
+	 * object on their slab page.
         */




[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