Subject: Re: Will it fix the cache problems?
To: Christopher SEKIYA <wileyc@rezrov.net>
From: Simon Burge <simonb@wasabisystems.com>
List: port-sgimips
Date: 12/14/2004 22:45:34
Christopher SEKIYA wrote:

> On Tue, Dec 14, 2004 at 09:59:23PM +1100, Simon Burge wrote:
> 
> > So on the R5000, the L2 cache doesn't help with alias detection?
> 
> Apparently so.

Bummer.

> > Is this problem specific to the way the caches are wired up on this model
> > SGI, or a problem with the R5000 in general?
> 
> Can't tell -- I have no non-SGI r5k gear.

Another bummer.

> > If I read your suggested patch correctly, it will cause extra unneeded
> > cache flushes on other CPUs/machines with multi-way data caches that
> > have also have an L2 cache.
> 
> Yes, that's why I didn't commit it -- it greatly hurts performance.  It's
> wrong, and I'd welcome suggestions on how to properly handle it.

At this stage, I'd suggest a new flag to add to cpu_arch in
<mips/cpu.h>.  Maybe something like CPU_MIPS_NO_L2_ALIAS_DETECT or
something similar?  Then replace the "mips_pdcache_ways > 1" with
"cpu_arch & CPU_MIPS_NO_L2_ALIAS_DETECT", or possibly something like the
other MIPS_HAS_ checks since this would only apply to MIPS4 CPUs.

For now, I think we would just set this for this model SGI, and if/when
we get another system that has an L2 with an R5000 and we get problems
reported we could then set this for all R5000 in the cputab array in
mips/mips_machdep.c.  If we get such a system and it works ok, we'd
obviously leave setting the flag for just this model SGI.

Does this sound ok?

> > What is the "system coma issue"?  I've seen a handful of passing references
> > to it now...
> 
> Under heavy compile load, the system will "freeze" -- dropping to ddb and
> killing the cc1plus process (it's _always_ cc1plus) wakes it back up.
> 
> I think that it's related to errata 3 for the r5k.  I saw it on my rev1.0
> r5k IP32, but I don't see it on my rev2.0 r5k IP24.

Interesting.  A bit of googling found
http://www.linux-mips.org/archives/linux-mips/2000-02/msg00040.html
I don't know if there's anything useful in there.

Simon.
--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD Support and Service:         http://www.wasabisystems.com/