All of lore.kernel.org
 help / color / mirror / Atom feed
* /proc/cpuinfo makes false assumptions of uniformity on IP27
@ 2006-10-06 12:33 Karl-Johan Karlsson
  2006-10-06 14:34 ` Ilya A. Volynets-Evenbakh
  2006-10-07 23:25 ` Ralf Baechle
  0 siblings, 2 replies; 3+ messages in thread
From: Karl-Johan Karlsson @ 2006-10-06 12:33 UTC (permalink / raw)
  To: linux-mips

The code in arch/mips/kernel/proc.c:show_cpuinfo() for showing
/proc/cpuinfo makes the assumption that all CPU:s are equal, and show
NR_CPUS copies of the information for whatever CPU we happen to be running
on. This leads to confusing output on SGI Origin 2000, since it can have
CPU:s of different types.

Here's a sample of what it looks like on my Origin 2000 with 16 R12000 and
16 R10000 CPU:s:

   creideiki@viggen ~ $ for i in `seq 0 2`; do echo -n "$i: "; grep ^cpu <
/proc/cpuinfo | uniq; done
   0: cpu model            : R12000 V2.3  FPU V0.0
   1: cpu model            : R10000 V3.4  FPU V0.0
   2: cpu model            : R12000 V2.3  FPU V0.0

The obvious fix would be to change "current_cpu_data" to "cpu_data[n]" in
arch/mips/kernel/proc.c:show_cpuinfo(), but two things remain:

0. I haven't actually tried it yet, since the only Origin 2000 I have is
in production. I should be able to reboot to a patched kernel sometime
during this weekend.

1. What about the CPU feature test macros in
include/asm-mips/cpu-features.h? They claim
  /*
   * SMP assumption: Options of CPU 0 are a superset of all processors.
   * This is true for all known MIPS systems.
   */
but is that really true, even on a mixed R12k/R10k system?

-- 
Karl-Johan Karlsson

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: /proc/cpuinfo makes false assumptions of uniformity on IP27
  2006-10-06 12:33 /proc/cpuinfo makes false assumptions of uniformity on IP27 Karl-Johan Karlsson
@ 2006-10-06 14:34 ` Ilya A. Volynets-Evenbakh
  2006-10-07 23:25 ` Ralf Baechle
  1 sibling, 0 replies; 3+ messages in thread
From: Ilya A. Volynets-Evenbakh @ 2006-10-06 14:34 UTC (permalink / raw)
  To: Karl-Johan Karlsson; +Cc: linux-mips

Try starting your O2K with R10K rack as primary, and you'll find out ;-)

Karl-Johan Karlsson wrote:
> 1. What about the CPU feature test macros in
> include/asm-mips/cpu-features.h? They claim
>   /*
>    * SMP assumption: Options of CPU 0 are a superset of all processors.
>    * This is true for all known MIPS systems.
>    */
> but is that really true, even on a mixed R12k/R10k system?
>
>   

-- 
Ilya A. Volynets-Evenbakh
Total Knowledge. CTO
http://www.total-knowledge.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: /proc/cpuinfo makes false assumptions of uniformity on IP27
  2006-10-06 12:33 /proc/cpuinfo makes false assumptions of uniformity on IP27 Karl-Johan Karlsson
  2006-10-06 14:34 ` Ilya A. Volynets-Evenbakh
@ 2006-10-07 23:25 ` Ralf Baechle
  1 sibling, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2006-10-07 23:25 UTC (permalink / raw)
  To: Karl-Johan Karlsson; +Cc: linux-mips

On Fri, Oct 06, 2006 at 02:33:43PM +0200, Karl-Johan Karlsson wrote:

> 1. What about the CPU feature test macros in
> include/asm-mips/cpu-features.h? They claim
>   /*
>    * SMP assumption: Options of CPU 0 are a superset of all processors.
>    * This is true for all known MIPS systems.
>    */
> but is that really true, even on a mixed R12k/R10k system?

To the degree that is actually matters, yes.  For cache managment on
Origins the size of the S-cache doesn't matter, that is it is not
relevant if scache_size(cpu 0) > or < scache_size(cpu 1).  It gets a
little hairy for stuff like performance counters where the R10000
supports a different set of events than its successors; that is not
something oprofile can deal with ...

  Ralf

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-10-07 23:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-06 12:33 /proc/cpuinfo makes false assumptions of uniformity on IP27 Karl-Johan Karlsson
2006-10-06 14:34 ` Ilya A. Volynets-Evenbakh
2006-10-07 23:25 ` Ralf Baechle

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.