mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Janos Farkas <chexum@shadow.banki.hu>
To: Dag Bakke <dagb@sgi.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Inconsistent cache size reporting.?
Date: Sat, 20 Jan 2001 17:26:10 +0100	[thread overview]
Message-ID: <priv$8dd123753$b9afe@lk8rp.mail.xeon.eu.org> (raw)
In-Reply-To: <3A67FA33.25F188E0@sgi.com>
In-Reply-To: <3A67FA33.25F188E0@sgi.com>; from Dag Bakke on Fri, Jan 19, 2001 at 09:26:27AM +0100

On 2001-01-19 at 09:26:27, Dag Bakke wrote:
> It looks as if /proc/cpuinfo reports the L2 cache size on a PII, while
> it reports the L1 cache size on a K6-2. 

The kernel can only detect (at least via "fetch-info-from-cpu" methods)
the size of internal caches.  If there is more level of them, it reports
the latter one (the one more closer to the memory), as all but the most
recent CPU caching techniques do not add up for multiple levels of
caches, so only the larger is the effective size.

I guess the entry in cpuinfo is just a hint for user programs to help
optimizing the size of data to be worked on.  External caches (mostly
found on Socket7 motherboards nowadays) don't really help tight loops,
just improve the memory access timings a bit, so they don't really
count..

So, on a PII/PIII, you'll see the L2 cache size reported (as it's
internal to the CPU), while on a K6, K6-2, you'll see the L1 cache size
(total), since the external (motherboard) caches are invisible to the
kernel.  (Ie. not easily recoverable).  On a K6-III, however, you'd see
the L2 cache as well; but the external cache is still invisible to the
kernel.

> I also note that performance on this system isn't quite what I would expect
> it to be. compiling glibc 2.1.3 takes longer time on my system than on a
> PII-366.
> A Celeron 300 outperforms the K6 when running 'mpeg2dec -o null'. Is the K6-2
> really this bad? Or is it my memory latency/bandwidth which is hurting me?

I seem to remember, that the K6 architecture is quite cache hungry,
that's why the K6-III is noticeably better than the K6-2.  Also, the FPU
is not quite the same than Intel's one, it's not obviously worse, but
needs different optimizations, or "3DNow!" supporting programs to reach
the same level of performance.  Your experience at compiling sounds a
bit surprising, a K6-III at 400 MHz seemed to perform much better than
anything on comparable frequencies, and the K6-2 was still quite similar
to Celerons, so maybe your motherboard has some quirky issues around
memory and/or cache, maybe your disks/controller is much worse on the K6
system, but what the kernel does report is nothing to worry about...

Janos
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

      reply	other threads:[~2001-01-20 16:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-19  8:26 Dag Bakke
2001-01-20 16:26 ` Janos Farkas [this message]

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='priv$8dd123753$b9afe@lk8rp.mail.xeon.eu.org' \
    --to=chexum@shadow.banki.hu \
    --cc=dagb@sgi.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®