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 12:07:26 -0500	[thread overview]
Message-ID: <1288199246.6886.9.camel@mulgrave.site> (raw)
In-Reply-To: <alpine.DEB.1.10.1010271837040.18202@artax.karlin.mff.cuni.cz>

On Wed, 2010-10-27 at 18:50 +0200, Mikulas Patocka wrote:
> > > Why is Kyle than suggesting that I am lucky because I have no L2 cache 
> > > (and therefore, Linux runs faster)?
> > > 
> > > Why are people talking here about flushing 32MB or 64MB L2 on fork()?
> > > 
> > > Or is it that you need to flush only L1 cache but the architecture forces 
> > > flush of both caches?
> > 
> > There's only a couple of flush instructions: fic and fdc ... they have
> > to flush all caches.  We did argue the toss on this with the HP
> > processor people since aliasing, which is primarily where we need
> > flushes for control, only occurs in the L1 cache.  However, they pointed
> > out that if they made fic and fdc L1 specific, we'd have no control over
> > DMA type ops which have to reach physical memory.
> > 
> > > I'd still like to see if someone with PA8800 or PA8900 with L2 ran that 
> > > shared memory experiment to actually *prove* that L2 is physically indexed 
> > > and that the L1 equivalency modulus is 4MB. I.e. not rely on what you 
> > > heard somewhere, but rely on what you see.
> > 
> > We already did all of that years ago just trying to make the pa8x00
> 
> If it is really proved, OK.
> 
> So, the CPU takes a hash of bits some bits up to 4MB and uses them to 
> calculate an index into 4-way not-power-of-two-sized L1 cache?
> 
> > chips work with linux ... they didn't for about 18 months.
> > 
> > James
> 
> Unfortunatelly, I still get some userspace crashes on SMP, I already found 
> one reproducible crash (running "make install" on gcc-4.5.1). The crash 
> happens with some probability, but the probability is high enough so that 
> it's reproducible.
> 
> Do you have some idea where cache flushing is missing so that I could try 
> if it fixes my case?

This is what we know

http://wiki.parisc-linux.org/TestCases

> BTW. if you flush cache on kmap, I think it couldn't work in multithreaded 
> environment at all --- i.e. the program has "int a, b;" both variables 
> share the cacheline, one thread is accessing "a" via kmap and the other 
> thread writes to b directly, for example "b = 5". Then, cache flushing 
> won't help and one of the variables will be trashed. You need kmap address 
> to be congruent with the linear address. But I think it's not reason for 
> my crash because neither gmake nor bash (that crashes) is multithreaded.

That statement assumes the threads share a data structure but are not
congruent ... which certainly isn't true for userspace.  Our only
incongruency which gives rise to aliasing is between the kernel and user
address spaces and we don't do data sharing between the two without
pretty severe accessor restrictions.

James



  reply	other threads:[~2010-10-27 17:07 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
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 [this message]
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=1288199246.6886.9.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