Information for setting up SMT related parameters on linux 2.6.16 on POWER5

Meswani, Mitesh mmeswani at utep.edu
Tue May 9 04:09:08 EST 2006


 
Hello 
 
I am looking to use the SMT related parameters like Snooze delay, HMT thread priorities, SMT ON/Off and wanted to know how to invoke and set them. I am running Open Suse 10 with 2.6.16.rc4-3-ppc64 kernel on eServer p590 2-way POWER5 partition. 
 
I noticed the parameters in /sys/devices/system/cpu/cpu#   with the following :
 
mmcr0  online       pmc2  pmc5  smt_snooze_delay
mmcr1  physical_id  pmc3  pmc6  topology
crash_notes  mmcra  pmc1         pmc4  purr

setting the value in online to 0 seems to turn off the logical processor, but I am not sure what the others are for and the meaning of their hex values? 
It seems that there is include/asm-ppc64/processor.h  with macros like HMT_very_low()  ,  wonder if these can be set on command line since I am running unmodified app binaries. 
 
 
 
Thanks, 
Mitesh
 
 

Mitesh R. Meswani 
Ph.D. Candidate 
Research Associate, PLS2 Group
Room 106 F, Department of Computer Science
The University of Texas at El Paso, 
El Paso, Texas 79968
Tel: 915 747 8012 (O)
Email: mmeswani at utep.edu

________________________________

From: linuxppc-dev-bounces+mmeswani=utep.edu at ozlabs.org on behalf of Geoff Levand
Sent: Fri 5/5/2006 6:00 PM
To: Paul Mackerras
Cc: Arnd Bergmann; Levand,Geoffrey; linux-kernel at vger.kernel.org; linuxppc-dev at ozlabs.org; Arnd Bergmann; cbe-oss-dev at ozlabs.org
Subject: Re: [PATCH 04/13] cell: remove broken __setup_cpu_be function



Paul Mackerras wrote:
> Arnd Bergmann writes:
>
>>  From: Geoff Levand <geoffrey.levand at am.sony.com>
>>
>> This patch removes the incorrect Cell processor setup routine
>> __setup_cpu_be.  This routine improperly accesses the hypervisor
>> page size configuration at SPR HID6.  The correct behavior is for
>> firmware, or if needed, platform setup code, to set the correct
>> page size.
>
>> -            .cpu_setup              = __setup_cpu_be,
>> +            .cpu_setup              = __setup_cpu_power4,
>
> That looks a bit dodgy.  Either just remove the contents of
> __setup_cpu_be (leaving only the blr), or define a __setup_cpu_null
> that does nothing, or make the identify_cpu not call the cpu setup
> function if the pointer is NULL.


OK, I set it up with __setup_cpu_null.  An updated patch follows.

It falls out from this that we can replace the do-nothing routines
__setup_cpu_power3 and __setup_cpu_power4 with __setup_cpu_null also.
I'll post a separate patch for consideration.

-Geoff


Replaced the Cell processor specific routine __setup_cpu_be with
a new generic routine __setup_cpu_null.  __setup_cpu_be improperly
accessed the hypervisor page size configuration at SPR HID6.  Correct
behavior is for firmware, or if needed, platform setup code, to set
the correct page size.


Signed-off-by: Geoff Levand <geoffrey.levand at am.sony.com>


Index: cell--alp--3/arch/powerpc/kernel/cpu_setup_power4.S
===================================================================
--- cell--alp--3.orig/arch/powerpc/kernel/cpu_setup_power4.S    2006-04-26 19:19:25.000000000 -0700
+++ cell--alp--3/arch/powerpc/kernel/cpu_setup_power4.S 2006-05-05 15:59:58.000000000 -0700
@@ -76,20 +76,6 @@
 _GLOBAL(__setup_cpu_power4)
        blr

-_GLOBAL(__setup_cpu_be)
-        /* Set large page sizes LP=0: 16MB, LP=1: 64KB */
-        addi    r3, 0,  0
-        ori     r3, r3, HID6_LB
-        sldi    r3, r3, 32
-        nor     r3, r3, r3
-        mfspr   r4, SPRN_HID6
-        and     r4, r4, r3
-        addi    r3, 0, 0x02000
-        sldi    r3, r3, 32
-        or      r4, r4, r3
-        mtspr   SPRN_HID6, r4
-       blr
-
 _GLOBAL(__setup_cpu_ppc970)
        mfspr   r0,SPRN_HID0
        li      r11,5                   /* clear DOZE and SLEEP */
Index: cell--alp--3/arch/powerpc/kernel/cputable.c
===================================================================
--- cell--alp--3.orig/arch/powerpc/kernel/cputable.c    2006-04-26 19:19:25.000000000 -0700
+++ cell--alp--3/arch/powerpc/kernel/cputable.c 2006-05-05 16:29:06.000000000 -0700
@@ -31,9 +31,9 @@
  * and ppc64
  */
 #ifdef CONFIG_PPC64
+extern void __setup_cpu_null(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_power3(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_power4(unsigned long offset, struct cpu_spec* spec);
-extern void __setup_cpu_be(unsigned long offset, struct cpu_spec* spec);
 #else
 extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
@@ -273,7 +273,7 @@
                        PPC_FEATURE_SMT,
                .icache_bsize           = 128,
                .dcache_bsize           = 128,
-               .cpu_setup              = __setup_cpu_be,
+               .cpu_setup              = __setup_cpu_null,
                .platform               = "ppc-cell-be",
        },
        {       /* default match */
Index: cell--alp--3/arch/powerpc/kernel/misc_64.S
===================================================================
--- cell--alp--3.orig/arch/powerpc/kernel/misc_64.S     2006-04-26 19:19:25.000000000 -0700
+++ cell--alp--3/arch/powerpc/kernel/misc_64.S  2006-05-05 16:04:59.000000000 -0700
@@ -768,6 +768,9 @@

 #endif /* CONFIG_ALTIVEC */

+_GLOBAL(__setup_cpu_null)
+       blr
+
 _GLOBAL(__setup_cpu_power3)
        blr

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev at ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20060508/56abfa24/attachment.htm>


More information about the Linuxppc-dev mailing list