Linux PARISC architecture development
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Cc: John David Anglin <dave@hiauly1.hia.nrc.ca>,
	kyle@mcmartin.ca, linux-parisc@vger.kernel.org
Subject: Re: PA caches (was: C8000 cpu upgrade problem)
Date: Wed, 27 Oct 2010 09:18:34 -0500	[thread overview]
Message-ID: <1288189114.4692.8.camel@mulgrave.site> (raw)
In-Reply-To: <alpine.DEB.1.10.1010271023540.31946@artax.karlin.mff.cuni.cz>

On Wed, 2010-10-27 at 10:35 +0200, Mikulas Patocka wrote:
> 
> On Wed, 27 Oct 2010, Mikulas Patocka wrote:
> 
> > 
> > 
> > On Tue, 26 Oct 2010, James Bottomley wrote:
> > 
> > > On Tue, 2010-10-26 at 21:29 -0400, John David Anglin wrote:
> > > > > - shared memory --- there is SHMLBA boundary that causes that all
> > > > mappings 
> > > > > are aligned to this boundary --- it is **WRONG** in the current
> > > > kernel!!! 
> > > > > It is only 4MB and should be 16MB!!!
> > > > 
> > > > James has said that the max for all PA-RISC implementations is
> > > > 4 MB.  The value is returned by the PDC_CACHE call.  Maybe a BUG_ON is
> > > > called for.  The alias boundary can be determined by the alias field
> > > > in the D_conf return value.
> > > 
> > > Why is it I get blamed for everything cache related on parisc?  The
> > 
> > You don't get blamed, we're just trying to find bugs :)
> > 
> > > statement in the manuals that the equivalency modulus is 16MB was left
> > > for future expansion.  However, given PA8900 is the last in the series,
> > > there is no future expansion.  John Marvin (I think it was) from the HP
> > > processor group confirmed that the largest equivalency modulus for any
> > > produced parisc processor is 4MB, so that's what we use in the kernel.
> > > 
> > > James
> > 
> > The largest L2 cache size is 64MB --- so if the cache is 4-way 
> > associative, the equivalency distance is 16MB (as the manual says).
> > 
> > If the equivalency distance were 4MB, the L2 cache would have to be 16-way 
> > (or the cache would have to be physically indexed and you wouldn't have to 
> > care about its consistency at all).
> > 
> > Mikulas
> 
> BTW. note that that internal documentation may be wrong. There's a 
> whitepaper about PA8700 on HP site that describes the dcache as 
> 375kBx4ways and icache as 188kBx4ways. It is hard to implement this way 
> (the CPU'd have to do some mathematics to calculate the cache index), I 
> much more believe that the cache is really 3-way or 6-way (where the CPU 
> could just take some bits of the address as the index).

I don't really buy that, but it depends on internals of the chip we
don't know about.  You seem to be assuming some type of CAS arrangement
but low associativity caches frequently use hidden index bits to cycle
through for the content, so their associativity is most often power of
two.

James

> That 64MB cache may be 16-way with 4MB modulus, but it looks less 
> plausible than a 4-way cache with 16MB modulus.
> 
> Anyway, if you think that the modulus is 4MB, try it --- take PA8900 with 
> 64MB cache, map shared memory to two processes to addresses congruent with 
> 4MB (but not 8MB), let one process write to odd bytes and the other to 
> even bytes and let the processes check that they read the bytes that they 
> wrote. If the caches don't synchronize, you'll get a corruption after some 
> time of running this.
> 
> Mikulas



  reply	other threads:[~2010-10-27 14:18 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20101024020337.725094D30@hiauly1.hia.nrc.ca>
2010-10-24  3:03 ` C8000 cpu upgrade problem Mikulas Patocka
2010-10-24  3:43   ` Kyle McMartin
2010-10-26  2:16     ` PA caches (was: C8000 cpu upgrade problem) Mikulas Patocka
2010-10-26  3:04       ` Kyle McMartin
2010-10-26  4:30         ` John David Anglin
2010-10-26 16:02         ` Mikulas Patocka
2010-10-27  1:29           ` John David Anglin
2010-10-27  2:40             ` John David Anglin
2010-10-27  4:50             ` James Bottomley
2010-10-27  8:06               ` Mikulas Patocka
2010-10-27  8:35                 ` Mikulas Patocka
2010-10-27 14:18                   ` James Bottomley [this message]
2010-10-27 14:07                 ` James Bottomley
2010-10-27 16:28                   ` Mikulas Patocka
2010-10-27 16:35                     ` James Bottomley
2010-10-27 16:50                       ` Mikulas Patocka
2010-10-27 17:07                         ` James Bottomley
2010-10-28  6:04                           ` John David Anglin
2010-10-28 16:55                             ` James Bottomley
2010-10-27  9:04               ` sym53c8xx_2 data corruption Mikulas Patocka
2010-10-27 14:46                 ` James Bottomley
2010-10-27 16:19                   ` Mikulas Patocka
2010-10-27 16:37                     ` James Bottomley
2010-10-28  5:59                     ` Grant Grundler
2010-12-18 20:13       ` PA caches (was: C8000 cpu upgrade problem) John David Anglin
2010-10-24  4:01   ` C8000 cpu upgrade problem John David Anglin
2010-10-26  2:04     ` Mikulas Patocka

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=1288189114.4692.8.camel@mulgrave.site \
    --to=james.bottomley@hansenpartnership.com \
    --cc=dave@hiauly1.hia.nrc.ca \
    --cc=kyle@mcmartin.ca \
    --cc=linux-parisc@vger.kernel.org \
    --cc=mikulas@artax.karlin.mff.cuni.cz \
    /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