From: Gerrit Huizenga <gh@us.ibm.com>
To: Daniel Phillips <phillips@arcor.de>
Cc: Andrew Morton <akpm@zip.com.au>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Rmap speedup
Date: Sat, 03 Aug 2002 16:55:22 -0700 [thread overview]
Message-ID: <E17b8jy-0005Sz-00@w-gerrit2> (raw)
In-Reply-To: Your message of Sun, 04 Aug 2002 00:49:27 +0200. <E17b7iB-0003Lu-00@starship>
Seperate cache lines yes, but don't you also need to be somewhat
aware of the algorithm used for 2-way or 4-way set associative cacheing?
I forget the details, but it seems like P-II or P-III used an algorithm
that dropped the last several bits when deciding which bucket in the
set it would put a value in. So when we had items at some multiple
of, I think 64 (could be 64 bytes, 64 kbytes) that only one entry
in the set associated cache would be used for lots and lots of memory
references. My brain is really fuzzy on this right now, but if anyone
knows that the, for instance, P-II or P-III algorithm is for doing
replacement in a 2-way or 4-way set associative cache is, that might
help point out where a micro-optimization isn't optimizing as expected...
And sorry for the vagueness of the description, I don't have my Intel
books at hand to dig this up. But that might account for wide variations
of a single function on two different processor types of the same
family.
gerrit
In message <E17b7iB-0003Lu-00@starship>, > : Daniel Phillips writes:
> On Saturday 03 August 2002 23:40, Andrew Morton wrote:
> > - total amount of CPU time lost spinning on locks is 1%, mainly
> > in page_add_rmap and zap_pte_range.
> >
> > That's not much spintime. The total system time with this test went
> > from 71 seconds (2.5.26) to 88 seconds (2.5.30). (4.5 seconds per CPU)
> > So all the time is presumably spent waiting on cachelines to come from
> > other CPUs, or from local L2.
>
> Have we tried this one:
>
> static inline unsigned rmap_lockno(pgoff_t index)
> {
> - return (index >> 4) & (ARRAY_SIZE(rmap_locks) - 1);
> + return (index >> 4) & (ARRAY_SIZE(rmap_locks) - 16);
> }
>
> (which puts all the rmap spinlocks in separate cache lines)
>
> --
> Daniel
> -
> 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 prev parent reply other threads:[~2002-08-03 23:52 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-02 19:42 Daniel Phillips
2002-08-02 20:20 ` Andrew Morton
2002-08-02 21:40 ` William Lee Irwin III
2002-08-03 0:14 ` Rik van Riel
2002-08-03 0:31 ` Andrew Morton
2002-08-03 0:52 ` William Lee Irwin III
2002-08-03 0:56 ` Rik van Riel
2002-08-03 3:47 ` Daniel Phillips
2002-08-03 5:24 ` Andrew Morton
2002-08-03 18:43 ` Daniel Phillips
2002-08-03 21:40 ` Andrew Morton
2002-08-03 21:54 ` Rik van Riel
2002-08-03 22:49 ` Daniel Phillips
2002-08-03 23:55 ` Gerrit Huizenga [this message]
2002-08-04 0:47 ` Andrew Morton
2002-08-04 1:01 ` Daniel Phillips
2002-08-04 14:11 ` Thunder from the hill
2002-08-04 14:47 ` Zwane Mwaikambo
2002-08-04 16:55 ` Tobias Ringstrom
2002-08-03 23:36 ` Daniel Phillips
2002-08-04 0:44 ` Andrew Morton
2002-08-03 21:05 ` Rik van Riel
2002-08-03 21:36 ` Daniel Phillips
2002-08-03 21:43 ` Andrew Morton
2002-08-03 21:41 ` Daniel Phillips
2002-08-03 21:24 ` [PATCH] Rmap speedup... call for testing Daniel Phillips
2002-08-03 22:05 ` [PATCH] Rmap speedup Daniel Phillips
2002-08-03 22:39 ` Andrew Morton
2002-08-03 22:35 ` Daniel Phillips
2002-08-04 23:33 ` Andrew Morton
2002-08-05 0:35 ` Daniel Phillips
2002-08-05 7:05 ` Andrew Morton
2002-08-05 13:48 ` Daniel Phillips
2002-08-05 13:57 ` Rik van Riel
2002-08-05 18:16 ` Andrew Morton
2002-08-07 18:59 ` Daniel Phillips
2002-08-07 19:40 ` Andrew Morton
2002-08-07 20:17 ` Daniel Phillips
2002-08-07 20:34 ` Andrew Morton
2002-08-07 20:51 ` Daniel Phillips
2002-08-07 20:54 ` Rik van Riel
2002-08-07 22:21 ` Daniel Phillips
2002-08-07 22:48 ` Andrew Morton
2002-08-07 20:39 ` Daniel Phillips
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=E17b8jy-0005Sz-00@w-gerrit2 \
--to=gh@us.ibm.com \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=phillips@arcor.de \
/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®