Re: [PATCH] shrinks dentry struct

From: Paul Jackson (pj_at_sgi.com)
Date: 11/30/05

  • Next message: Paul Mackerras: "Re: Linux 2.6.15-rc3"
    Date:	Tue, 29 Nov 2005 18:06:53 -0800
    To: Eric Dumazet <dada1@cosmosbay.com>
    
    

    Eric,

    Would the following accomplish the same thing as your patch, to shrink
    UP dentry structs back to 128 bytes, with a smaller and less intrusive
    patch?

    ---
     include/linux/dcache.h |    9 +++++++--
     1 files changed, 7 insertions(+), 2 deletions(-)
    --- 2.6.15-rc2-mm1.orig/include/linux/dcache.h	2005-11-29 17:45:51.977352268 -0800
    +++ 2.6.15-rc2-mm1/include/linux/dcache.h	2005-11-29 18:04:59.151307979 -0800
    @@ -95,19 +95,24 @@ struct dentry {
     	struct qstr d_name;
     
     	struct list_head d_lru;		/* LRU list */
    -	struct list_head d_child;	/* child of parent list */
    +	union {				/* Fit 32 bit UP dentry in 128 bytes */
    +		struct list_head du_child;	/* child of parent list */
    + 		struct rcu_head du_rcu;
    +	} d_du;
     	struct list_head d_subdirs;	/* our children */
     	struct list_head d_alias;	/* inode alias list */
     	unsigned long d_time;		/* used by d_revalidate */
     	struct dentry_operations *d_op;
     	struct super_block *d_sb;	/* The root of the dentry tree */
     	void *d_fsdata;			/* fs-specific data */
    - 	struct rcu_head d_rcu;
     	struct dcookie_struct *d_cookie; /* cookie, if any */
     	int d_mounted;
     	unsigned char d_iname[DNAME_INLINE_LEN_MIN];	/* small names */
     };
     
    +#define d_child d_du.du_child
    +#define d_rcu d_du.du_rcu
    +
     struct dentry_operations {
     	int (*d_revalidate)(struct dentry *, struct nameidata *);
     	int (*d_hash) (struct dentry *, struct qstr *);
    -- 
                      I won't rest till it's the best ...
                      Programmer, Linux Scalability
                      Paul Jackson <pj@sgi.com> 1.925.600.0401
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Paul Mackerras: "Re: Linux 2.6.15-rc3"

    Relevant Pages