All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: "Kevin D. Kissell" <kevink@mips.com>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>,
	creideiki+linux-mips@ferretporn.se, linux-mips@linux-mips.org
Subject: Re: Extreme system overhead on large IP27
Date: Thu, 26 Oct 2006 17:50:28 +0100	[thread overview]
Message-ID: <20061026165023.GA24373@linux-mips.org> (raw)
In-Reply-To: <003001c6f905$db2781f0$10eca8c0@grendel>

On Thu, Oct 26, 2006 at 03:51:35PM +0200, Kevin D. Kissell wrote:

> I don't see what's different here than in any other SMP case.

It just happened to be a coonfiguration which happened to trigger the
issue.  But the underlying problem could exist on any other SMP system
using per-processor timers.

>  Is it really
> true that the MIPS SMP support *requires* that all CPUs in the system
> come out of reset on the same clock, with the same value in Count?

There isn't even an requirement to use the cp0 counter at all.  It just
happens to be that the VSMP kernel is using that timer.  It also happens
to be quite a logic choice on the Malta where the alternative would be
specific to one of the several system controllers.

SGI systems are infamous for potencially using mixed spec CPUs from the
same family.  That includes different clock speeds; something like having
180MHz R10000 and 500MHz R14000 would be possible.  The only sane cure for
the time code in such cases is avoiding c0_count and relying on some other
system-wide time source.  The same is may be needed in case of variable
CPU clock.

That said, Linux doesn't care just need a little bit of glue code to deal
with arbitrary timers.

> I find that very surprising (and a little disappointing).  Is this a general
> limitation of Linux? MIPS32/MIPS64 PRAs call out the reset value
> of Count as being undefined, and chip specs for pre-MIPS32 CPUs
> like the R10000 and the R4400 do not call out any reset value for
> Count either.

The count / compare code is very much did originate on uniprocessor
systems and the sole thing it cares about is the speed the counter is
incrementing at, not the absolute value.

> If there's going to be skew between CPU clocks, all it really means
> is that one cannot directly compare timestamps generated by different
> CPUs.  At a given point in time, "How long will it be until you hit an 
> absolute Count value X?"  will have a slightly different answer on each CPU 
> if there is skew, but "What will the local Count value be N jiffies from now?"
> should be something that can be correctly calculated independently on each 
> node. Where are we depending on the former, and can that usage be converted
> into something more like the later?
>             Kevin K.

  Ralf

      reply	other threads:[~2006-10-26 16:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-21 19:59 Extreme system overhead on large IP27 Karl-Johan Karlsson
2006-10-22 15:21 ` Ralf Baechle
2006-10-22 23:23   ` Ralf Baechle
2006-10-23  0:19     ` Ralf Baechle
2006-10-23 21:30       ` Karl-Johan Karlsson
     [not found]         ` <20061023224318.GA1732@linux-mips.org>
2006-10-24 13:53           ` Karl-Johan Karlsson
2006-10-24 14:06             ` Ralf Baechle
2006-10-24 15:33               ` Ilya A. Volynets-Evenbakh
2006-10-24 15:44               ` Karl-Johan Karlsson
2006-10-24 15:50                 ` Ralf Baechle
2006-10-24 17:34                 ` Atsushi Nemoto
2006-10-24 17:50                   ` Ralf Baechle
2006-10-25  8:45                 ` Atsushi Nemoto
2006-10-26  4:05                   ` Atsushi Nemoto
2006-10-26  7:42                     ` Manish Lachwani
2006-10-26 14:16                       ` Atsushi Nemoto
2006-10-27  1:55                         ` mlachwani
2006-10-26  8:41                     ` Karl-Johan Karlsson
2006-10-26 12:56                     ` Ralf Baechle
2006-10-26 13:51                       ` Kevin D. Kissell
2006-10-26 13:51                         ` Kevin D. Kissell
2006-10-26 16:50                         ` Ralf Baechle [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=20061026165023.GA24373@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=anemo@mba.ocn.ne.jp \
    --cc=creideiki+linux-mips@ferretporn.se \
    --cc=kevink@mips.com \
    --cc=linux-mips@linux-mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.