From: Greg Weeks <greg.weeks@timesys.com>
To: linux-mips@linux-mips.org
Subject: memcpy prefetch
Date: Wed, 06 Apr 2005 08:30:52 -0400 [thread overview]
Message-ID: <4253D67C.4010705@timesys.com> (raw)
In trying to understand the prefetch code in memcpy it looks like it's
prefetching too far out in front of the loop. In the main aligned loop
the loop copies 32 or 64 bytes of data and the prefetch is trying to
prefetch 256 bytes ahead of the current copy. The prefetches should also
pay attention to cache line size and they currently don't. If the line
size is less than the copy size we are skipping prefetches that should
be done. For the 4kc the line size is only 16 bytes. We should be doing
a prefetch for each line. The src_unaligned_dst_aligned loop is even
worse as it prefetches 288 bytes ahead of the copy and only copies 16 or
32 bytes at a time.
Have I totally misunderstood the code?
Greg Weeks
next reply other threads:[~2005-04-06 12:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-06 12:30 Greg Weeks [this message]
2005-04-06 20:08 ` memcpy prefetch Ralf Baechle
2005-04-07 12:14 ` Greg Weeks
2005-04-07 12:25 ` Ralf Baechle
2005-04-07 12:25 ` Michael Uhler
2005-04-07 12:25 ` Michael Uhler
2005-04-07 12:28 ` Dominic Sweetman
2005-04-07 14:05 ` Ralf Baechle
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=4253D67C.4010705@timesys.com \
--to=greg.weeks@timesys.com \
--cc=linux-mips@linux-mips.org \
/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