Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Kyle McMartin <kyle@mcmartin.ca>
To: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Cc: Kyle McMartin <kyle@mcmartin.ca>,
	John David Anglin <dave@hiauly1.hia.nrc.ca>,
	linux-parisc@vger.kernel.org
Subject: Re: PA caches (was: C8000 cpu upgrade problem)
Date: Mon, 25 Oct 2010 23:04:42 -0400	[thread overview]
Message-ID: <20101026030442.GS8332@bombadil.infradead.org> (raw)
In-Reply-To: <alpine.DEB.1.10.1010260404260.6982@artax.karlin.mff.cuni.cz>

On Tue, Oct 26, 2010 at 04:16:39AM +0200, Mikulas Patocka wrote:
> I tried UP build and it is almost twice slower when compiling (obviously). 
> So I don't see any performance advantage in running UP :)
> 
> Generally, performance of two-way 900MHz machine is not that bad --- 5 
> times faster compile than 440MHz sparc. It suffers only on tests involving 
> mostly kernelwork, but no so seriously --- 3.5 times faster than said 
> sparc when doing a "dummy" make of an already compiled project (just 
> testing timestamps) and 1.2 times faster than sparc on make clean (ok, it 
> sucks when re-calculated to clock-to-clock). Generally, I think it's 
> usable for development.
> 

Heh. I think you may be lucking in here... see below.

> I found that gcc 4.3 from Debian 5 is buggy, it miscompiled the UP kernel. 
> Compiling it with -Os worked fine. Could you please recommend a compiler 
> to use? (4.4 from Debian 6 ... or some other version?)
> 

4.4.5 from sid is what I'm using... I think it's working more or less
for me. I've only been building/booting UP/SMP on an rp3440 these days,
so I'm not sure about 32-bit.

> > our cache flushing is a bit... suboptimal right now (doing whole cache
> > flushes on fork and such.)
> 
> What is exactly the problem there? Could you describe it or refer to some 
> document that describes it? Why do you need to flush on fork?
> 
> Sparc has virtually indexed caches too, but there are not many problems 
> with it, basically the only needed thing is to flush the cache when kernel 
> touches some user page via its own mapping. (if they ran with 16kB page 
> size, they wouldn't have to care about data cache coherency at all).
> 

I can't remember exactly why offhand, I'm sure jejb can remind us.

> Another thing I don't understand: the L1 cache is supposed to be 
> direct-mapped, but it's size is 768kB. I can't imagine how is it 
> implemented. Does it mean that the processor does a divide-by-3 on every 
> cache access?
> 
> Or is it a mistake and the cache is 3-way set associative, with set size 
> 256kB? (that would make much more sense)
> 

That's the output from one of the firmware queries, which has been lying
to us for a very long time (apparently HP just doesn't test these things
or something.) It believe the pa8800 L1 caches were 4-way associative.

So, on to the interesting bit!

Does your /proc/cpuinfo actually say 768kB? That's... amazingly
interesting. I wonder (out loud, sorry I should go back and look at the
prior emails) if that's the cause of your cpu issues...

processor       : 0
cpu family      : PA-RISC 2.0
cpu             : PA8800 (Mako)
cpu MHz         : 999.995500
capabilities    : os64
model           : 9000/800/rp3440  
model name      : Storm Peak Fast
hversion        : 0x00008890
sversion        : 0x00000491
I-cache         : 32768 KB
D-cache         : 32768 KB (WB, direct mapped)
ITLB entries    : 240
DTLB entries    : 240 - shared with ITLB
bogomips        : 1998.84
software id     : 4468984695822677774

is what mine says... (with the 32MB L2 cache.)

Anyway, the L1 are usually 2/4-way associative on parisc, iirc, I
believe the L2 is as well.

The main problems we see on the pa8800 is due to the L2, which is
physically indexed, and exclusive. We had some bizarre
corruption due to incorrect evictions there. (And flushing 32MB on
fork is just utterly painful, we really need to fix that someday.)

--Kyle

  reply	other threads:[~2010-10-26  3:04 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 [this message]
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
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=20101026030442.GS8332@bombadil.infradead.org \
    --to=kyle@mcmartin.ca \
    --cc=dave@hiauly1.hia.nrc.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