From: Paul Menage <pmenage@ensim.com>
To: Dave Jones <davej@suse.de>
Cc: viro@math.psu.edu, linux-kernel@vger.kernel.org
Cc: pmenage@ensim.com
Subject: Re: [RFC] Rearranging struct dentry for cache affinity
Date: Fri, 12 Jul 2002 14:21:04 -0700 [thread overview]
Message-ID: <E17T7qa-0007FC-00@pmenage-dt.ensim.com> (raw)
In-Reply-To: Your message of "Fri, 12 Jul 2002 22:58:28 +0200." <20020712225828.E18503@suse.de>
>On Fri, Jul 12, 2002 at 01:38:35PM -0700, Paul Menage wrote:
>
> > - dentry->d_vfs_flags |= DCACHE_REFERENCED;
> > +#ifdef CONFIG_SMP
> > + if(!(dentry->d_vfs_flags & DCACHE_REFERENCED))
> > +#endif
> > + dentry->d_vfs_flags |= DCACHE_REFERENCED;
>
>Yuck. Is doing this conditional on UP really a measurable effect?
I'm don't know yet - I did some brief tests on x86 UP to see how much
positive/negative effect the branch misses versus the cache dirtying
had, and (using an exponentially decaying distribution of entries being
tested/set) the if() statement did show an improvement for sufficiently
skewed distributions. But I've no idea yet how that matches up to the
distributions that we'd see in the dcache in actual use.
As I said in an earlier email, it might be nice to have an
__ensure_bit_set() function that uses architecture-specific knowledge to
make sure a particular bit is set as efficiently as possible. (e.g.
taking advantage of predicated writes, etc).
>If you must microoptimise
>to this level, at least try and keep the code clean.
Sure - this is just a quick [RFC] hack.
Paul
next prev parent reply other threads:[~2002-07-12 21:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-12 20:38 Paul Menage
2002-07-12 20:58 ` Dave Jones
2002-07-12 21:21 ` Paul Menage [this message]
2002-07-13 9:11 ` Alexander Viro
2002-07-16 3:54 ` Rusty Russell
2002-07-16 4:40 ` Alexander Viro
2002-07-17 0:04 ` Rusty Russell
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=E17T7qa-0007FC-00@pmenage-dt.ensim.com \
--to=pmenage@ensim.com \
--cc=davej@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@math.psu.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®