Re: [PATCH 8/13] vfs: Introduce the dentry mobs

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

 



On Tue, May 03, 2011 at 04:18:33PM +0400, Pavel Emelyanov wrote:
> diff --git a/include/linux/dcache.h b/include/linux/dcache.h
> index 64848dd..80bb9e4 100644
> --- a/include/linux/dcache.h
> +++ b/include/linux/dcache.h
> @@ -48,6 +48,12 @@ struct dentry_stat_t {
>  };
>  extern struct dentry_stat_t dentry_stat;
>  
> +struct dentry_mob {
> +	struct percpu_counter nr_dentry;
> +	unsigned long nr_dentry_max;
> +	struct list_head dentry_lru;
> +};
> +
>  /*
>   * Compare 2 name strings, return 0 if they match, otherwise non-zero.
>   * The strings are both count bytes long, and count is non-zero.
> @@ -143,6 +149,7 @@ struct dentry {
>  	} d_u;
>  	struct list_head d_subdirs;	/* our children */
>  	struct list_head d_alias;	/* inode alias list */
> +	struct dentry_mob *d_mob;
>  };

I'd prefer if it was under a config option considering it'd waste 8
bytes of memory for every dentry in the system, if you don't ever use
it because you use other types of virt that solves the guest memory
partitioning without any change to the host OS. Same may apply to
other parts of the patch (yeah, maybe SLAB_HWCACHE_ALIGN won't change
memory footprint of dcache today, I didn't actually count but dentry
may change tomorrow making the dentry require one more cacheline that
is not cheap at all in memory footprint terms). I don't think all
distro are enabling all host support you need in the first place, so I
don't think it should be a problem for you if this goes under a config
option, surely I'd be more comfortable with that.
--
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