All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: linux-kernel@vger.kernel.org
Cc: levon@movementarian.org, Al Viro <viro@ftp.linux.org.uk>
Subject: make "struct d_cookie" dependable on CONFIG_PROFILING?
Date: Tue, 17 Jan 2006 10:27:01 -0200	[thread overview]
Message-ID: <20060117122701.GA26491@dmt.cnet> (raw)


Hi,

Is there any good reason for not making "struct dcookie_struct
*d_cookie" dependable on CONFIG_PROFILING? 

Shrinks "struct dentry" from 128 bytes to 124 on x86, allowing
31 objects per slab instead of 30.

John Levon informed me that he had such selection in his
original patches, but was asked but take it off (?).


--- ./fs/dcache.c.orig	2006-01-17 09:52:31.000000000 -0200
+++ ./fs/dcache.c	2006-01-17 09:52:50.000000000 -0200
@@ -743,7 +743,9 @@ struct dentry *d_alloc(struct dentry * p
 	dentry->d_op = NULL;
 	dentry->d_fsdata = NULL;
 	dentry->d_mounted = 0;
+#ifdef CONFIG_PROFILING
 	dentry->d_cookie = NULL;
+#endif
 	INIT_HLIST_NODE(&dentry->d_hash);
 	INIT_LIST_HEAD(&dentry->d_lru);
 	INIT_LIST_HEAD(&dentry->d_subdirs);
--- ./include/linux/dcache.h.orig	2006-01-17 09:54:12.000000000 -0200
+++ ./include/linux/dcache.h	2006-01-17 09:55:26.000000000 -0200
@@ -108,7 +108,9 @@ struct dentry {
 	struct dentry_operations *d_op;
 	struct super_block *d_sb;	/* The root of the dentry tree */
 	void *d_fsdata;			/* fs-specific data */
+#ifdef CONFIG_PROFILING
 	struct dcookie_struct *d_cookie; /* cookie, if any */
+#endif
 	int d_mounted;
 	unsigned char d_iname[DNAME_INLINE_LEN_MIN];	/* small names */
 };

             reply	other threads:[~2006-01-17 14:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-17 12:27 Marcelo Tosatti [this message]
2006-01-17 15:06 ` make "struct d_cookie" dependable on CONFIG_PROFILING? Philippe Elie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060117122701.GA26491@dmt.cnet \
    --to=marcelo.tosatti@cyclades.com \
    --cc=levon@movementarian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ftp.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.