linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Dan Malek <dan@netx4.com>
To: Adrian Cox <apc@agelectronics.co.uk>
Cc: Dan Malek <dan@netx4.com>,
	linuxppc-dev <linuxppc-dev@lists.linuxppc.org>
Subject: Re: Help with string.S
Date: Tue, 11 Jul 2000 11:53:20 -0400	[thread overview]
Message-ID: <396B42F0.EF939444@embeddededge.com> (raw)
In-Reply-To: 396AF1B8.6FB1401C@agelectronics.co.uk


Adrian Cox wrote:

> The 7xx(x) processors don't have the alignment handler set up ....

Paul and I (and possibly others) conspired and added this in the late
2.3.xx kernels for all processors.  It had been floating around for
the MPC8xx processors, I hit it again on the 8260, and we just made
the code generic for all processors.  It "fixes" alignment faults and
will also zero memory on a dcbz fault.  Hmmm, I wonder if this code
actually gets called and if it still does the right thing?  I'll check
it again.

> Or by removing the cache operations. Even if they stay, could they be a
> compilation time optimisation for particular processors?

While the code wasn't really correct for anything but 32 byte cache
lines, it should work correctly on 16 byte lines.  You don't get the
performance increase as the dcbz is only performed every other cache
line.  However, like David mentioned, it really is broken for 64 and
128 byte cache lines.  Here, you zero a long line, but only fill 32
bytes of data.  You end up with a nearly zero filled buffer.

Anyway, enough talk, it has to be fixed.  I'll do the best I can.  I
would like to remove the assumption in copy_tofrom_user that we can
fault in so many places in the cache line.  Considering all of the
alignment restrictions, it seems to me you will only fault on the
first access to the cache line (it isn't like you are going to
cross a page boundary in the middle of a line).  This would simplify
the function and make for a much smaller exception table.

> The 7400 certainly doesn't need the dcbz, as it will perform an implicit
> allocation if the entire cache line is written by store instructions.

No, but those cache streaming instructions and data move cache hints
really do something.  It was my attempt at humor, you see :-).


	-- Dan

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2000-07-11 15:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-08 22:57 Help with string.S Dan Malek
2000-07-08 23:57 ` Dan Malek
2000-07-10  6:14 ` Daniel Marmier
2000-07-10 15:17   ` David Edelsohn
2000-07-10 22:42   ` Dan Malek
2000-07-11  5:50     ` Daniel Marmier
2000-07-13 18:52       ` Dan Malek
2000-07-11 10:06     ` Adrian Cox
2000-07-11 15:53       ` Dan Malek [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-08-16  7:26 Graham Stoney
2000-08-16 16:22 ` tom_gall
2000-08-17  0:50   ` Graham Stoney
2000-08-17 19:28 ` Dan Malek

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=396B42F0.EF939444@embeddededge.com \
    --to=dan@netx4.com \
    --cc=apc@agelectronics.co.uk \
    --cc=linuxppc-dev@lists.linuxppc.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;
as well as URLs for NNTP newsgroup(s).