From: William Lee Irwin III <wli@holomorphy.com>
To: Dave Hansen <haveblue@us.ibm.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"Martin J. Bligh" <mbligh@aracnet.com>,
Gerrit Huizenga <gh@us.ibm.com>
Subject: Re: Horrible L2 cache effects from kernel compile
Date: Mon, 24 Feb 2003 16:59:22 -0800 [thread overview]
Message-ID: <20030225005922.GU10411@holomorphy.com> (raw)
In-Reply-To: <3E5ABBC1.8050203@us.ibm.com>
On Mon, Feb 24, 2003 at 04:41:37PM -0800, Dave Hansen wrote:
> c01cc948 334779 8.82177 __copy_to_user_ll
> c015797c 314165 8.27857 d_lookup
> c012c964 157716 4.15598 find_get_page
> c013cae0 156345 4.11985 page_add_rmap
> c0176557 148116 3.90301 .text.lock.inode
> c013cc38 132228 3.48434 page_remove_rmap
> c0176338 90851 2.39402 ext3_dirty_inode
> c0117320 80918 2.13227 scheduler_tick
> c01ccae0 79475 2.09425 atomic_dec_and_lock
> c0138cd4 75367 1.986 do_no_page
> c0139b60 75317 1.98468 vm_enough_memory
> c017d78c 72929 1.92175 start_this_handle
Your profile was upside down. I've re-sorted it.
It probably confused people who were wondering why the numbers
at the top of the profile were lower than the ones below them.
On Mon, Feb 24, 2003 at 04:41:37PM -0800, Dave Hansen wrote:
> a snippet from d_lookup(), annotated. I've seen oprofile be off by a
> line here, but we can be pretty sure it is in this area.
> smp_read_barrier_depends();
> /* 106 0.002793% */
> dentry = list_entry(tmp, struct dentry, d_hash);
> /* if lookup ends up in a different bucket
> * due to concurrent rename, fail it
> */
> /* 154991 4.084% */
> if (unlikely(dentry->d_bucket != head))
> break;
> /* to avoid race if dentry keep coming back to original
> * bucket due to double moves
> */
> /* 634 0.01671% */
> if (unlikely(++lookup_count > max_dentries))
> break;
> ...
Well, you're walking hash chains, you're going to get a lot of cache
misses, about the whole length of the chain's worth. You could try
changing the dcache to use something like a B+ tree or some such
nonsense to reduce its cache footprint.
I'd collect statistics to see if the dcache hash function is badly
distributing things. That's relatively easily fixable if so.
-- wli
next prev parent reply other threads:[~2003-02-25 0:50 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-25 0:41 Horrible L2 cache effects from kernel compile Dave Hansen
2003-02-25 0:59 ` William Lee Irwin III [this message]
2003-02-25 1:01 ` Dave Hansen
2003-02-25 3:15 ` John Levon
2003-02-25 3:15 ` William Lee Irwin III
2003-02-25 3:35 ` Andrew Morton
2003-02-25 4:13 ` Martin J. Bligh
2003-02-25 11:57 ` John Levon
2003-02-25 2:31 ` Linus Torvalds
2003-02-25 17:05 ` John W. M. Stevens
[not found] <3E5ABBC1.8050203@us.ibm.com.suse.lists.linux.kernel>
2003-02-25 16:16 ` Andi Kleen
2003-02-27 3:24 ` Dave Hansen
2003-02-27 16:36 ` Jan Harkes
[not found] ` <b3ekil$1cp$1@penguin.transmeta.com.suse.lists.linux.kernel>
[not found] ` <20030225170546.GA23772@morningstar.nowhere.lie.suse.lists.linux.kernel>
2003-02-25 17:20 ` Andi Kleen
2003-02-26 18:22 ` Jamie Lokier
-- strict thread matches above, loose matches on Subject: below --
2003-02-25 18:37 Manfred Spraul
2003-02-25 18:41 ` Dave Hansen
2003-02-25 18:42 ` Andi Kleen
2003-02-25 19:29 ` Martin J. Bligh
2003-02-25 22:18 ` Linus Torvalds
2003-03-03 19:03 ` Benjamin LaHaise
2003-03-03 19:13 ` Linus Torvalds
2003-03-03 23:58 ` Alan Cox
2003-03-03 22:57 ` Andrew Morton
2003-03-03 23:01 ` Benjamin LaHaise
2003-03-03 23:09 ` Linus Torvalds
2003-03-05 20:19 ` dean gaudet
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=20030225005922.GU10411@holomorphy.com \
--to=wli@holomorphy.com \
--cc=gh@us.ibm.com \
--cc=haveblue@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@aracnet.com \
/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