From: David Mosberger <davidm@napali.hpl.hp.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: linux-kernel@vger.kernel.org, Andrea Arcangeli <andrea@suse.de>,
Linus Torvalds <torvalds@transmeta.com>
Subject: Re: Q: PREFETCH_STRIDE/16
Date: Thu, 23 May 2002 09:26:54 -0700 [thread overview]
Message-ID: <15597.6222.724619.443491@napali.hpl.hp.com> (raw)
In-Reply-To: <Pine.LNX.4.21.0205231554090.1304-100000@localhost.localdomain>
>>>>> On Thu, 23 May 2002 16:12:16 +0100 (BST), Hugh Dickins <hugh@veritas.com> said:
Hugh> Could anyone please shed light on PREFETCH_STRIDE, and in
Hugh> particular its sole use:
Hugh> prefetchw(pmd+j+(PREFETCH_STRIDE/16)); in mm/memory.c:
Hugh> free_one_pgd().
Hugh> That looks to me suspiciously like something inserted to suit
Hugh> one particular architecture - ia64? is it really suitable for
Hugh> others? is 4*L1_CACHE_SIZE really right for PREFETCH_STRIDE on
Hugh> anything that prefetches except ia64? what's the "/ 16"?
Hugh> shouldn't there be a "/ sizeof(pmd_t)" somewhere (PAE or not)?
Hugh> is it right to prefetch each time around that loop? isn't it
Hugh> appropriate only to the exit_mm (0 to TASK_SIZE) clearance?
Hugh> All in all, I'm thinking that line shouldn't be there, or not
Hugh> without a substantial comment...
That code certainly wasn't optimized for ia64. Furthermore, I also do
not like the prefetch distance it's using. In fact, in my ia64-patch,
I use the following code instead:
prefetchw(pmd + j + PREFETCH_STRIDE/sizeof(*pmd));
This is more sensible (because it really does prefetch by the
PREFETCH_STRIDE distance) and it also happens to run (slightly) faster
on Itanium.
--david
next prev parent reply other threads:[~2002-05-23 16:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-23 15:12 Hugh Dickins
2002-05-23 16:26 ` David Mosberger [this message]
2002-05-23 16:21 ` David S. Miller
2002-05-23 16:43 ` David Mosberger
2002-05-23 16:34 ` David S. Miller
2002-05-23 17:02 ` David Mosberger
2002-05-23 17:00 ` David S. Miller
2002-05-23 18:32 ` David Mosberger
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=15597.6222.724619.443491@napali.hpl.hp.com \
--to=davidm@napali.hpl.hp.com \
--cc=andrea@suse.de \
--cc=davidm@hpl.hp.com \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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
all inboxes | Powered by JetHome®