Topic
  • 5 replies
  • Latest Post - ‏2010-05-20T03:14:30Z by SystemAdmin
null
null
11 Posts

Pinned topic Is there documentation on using ppc64_cpu --dscr ?

‏2010-05-12T19:45:00Z |
We're trying to use "ppc64_cpu --dscr" on a new POWER7 system. Is the ppc64_cpu command documented anywhere? Are the DSCR values similarly documented somewhere?
Updated on 2010-05-20T03:14:30Z at 2010-05-20T03:14:30Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    706 Posts

    Re: Is there documentation on using ppc64_cpu --dscr ?

    ‏2010-05-12T20:05:24Z  
    DSCR is documented in the Power Instruction Set Architecture Version 2.06.


    There's a link there for the Power ISA document


    • Page 702 in the PDF document is the DSCR documentation.

    I don't know off-hand how the ppc64_cpu command controls DSCR on the Power systems.
  • wpeter
    wpeter
    5 Posts

    Re: Is there documentation on using ppc64_cpu --dscr ?

    ‏2010-05-14T15:34:52Z  
    DSCR is documented in the Power Instruction Set Architecture Version 2.06.


    There's a link there for the Power ISA document


    • Page 702 in the PDF document is the DSCR documentation.

    I don't know off-hand how the ppc64_cpu command controls DSCR on the Power systems.
    Page 702 of the Power ISA document has the DSCR documentation.

    Bits 59-63 are briefly described here:

    Bit 59: default is 0, disable stride-N stream
    Bit 60: default is 0, disable store stream
    Bits 61-63: default is "000", the prefetch depth. "000" is not depth 0 and it corresponds to the HW default which is usually 5 (101). If Bit 60 is 0, the prefetch depth is only applied to the load stream. If Bit 60 is 1, the prefetch depth is for both the load and store streams. "001" is a special value which disables both load and store prefetching.

    "ppc64_cpu --dscr=0x8" (0x8 = 1000 base 2) means enabling the store and load streams with the prefetch depth of 4. The maximum depth is 6 with "111". Therefore, 5 (101) (= 0 (000)) corresponds to the depth of 4.

    "ppc64_cpu --dscr=0x9" "disables" both load and store prefetching, since Bits 61-63 is 001.

    It is a known problem that "ppc64_cpu --dscr=" does not work correctly for 0xa and above. 0xa is interpreted incorrectly as 0x10. A fix is being worked on.

    We can use the following script, setdscr.sh, to set values 0xa and higher by a simple "echo" command. Let's assume that we have a Power system with 32 cores running at the ST mode, and CPUs are numbered as 0, 4, 8, ..., 120, 124.

    =======================
    #!/bin/bash

    i="0"

    while $i -lt 128
    do
    echo $1 > /sys/devices/system/cpu/cpu$i/dscr
    cat /sys/devices/system/cpu/cpu$i/dscr
    i=$$i+4
    done
    =======================

    For example, "setdscr.sh 0x14" will set all dscr values to 0x14.
  • wpeter
    wpeter
    5 Posts

    Re: Is there documentation on using ppc64_cpu --dscr ?

    ‏2010-05-14T15:37:06Z  
    • wpeter
    • ‏2010-05-14T15:34:52Z
    Page 702 of the Power ISA document has the DSCR documentation.

    Bits 59-63 are briefly described here:

    Bit 59: default is 0, disable stride-N stream
    Bit 60: default is 0, disable store stream
    Bits 61-63: default is "000", the prefetch depth. "000" is not depth 0 and it corresponds to the HW default which is usually 5 (101). If Bit 60 is 0, the prefetch depth is only applied to the load stream. If Bit 60 is 1, the prefetch depth is for both the load and store streams. "001" is a special value which disables both load and store prefetching.

    "ppc64_cpu --dscr=0x8" (0x8 = 1000 base 2) means enabling the store and load streams with the prefetch depth of 4. The maximum depth is 6 with "111". Therefore, 5 (101) (= 0 (000)) corresponds to the depth of 4.

    "ppc64_cpu --dscr=0x9" "disables" both load and store prefetching, since Bits 61-63 is 001.

    It is a known problem that "ppc64_cpu --dscr=" does not work correctly for 0xa and above. 0xa is interpreted incorrectly as 0x10. A fix is being worked on.

    We can use the following script, setdscr.sh, to set values 0xa and higher by a simple "echo" command. Let's assume that we have a Power system with 32 cores running at the ST mode, and CPUs are numbered as 0, 4, 8, ..., 120, 124.

    =======================
    #!/bin/bash

    i="0"

    while $i -lt 128
    do
    echo $1 > /sys/devices/system/cpu/cpu$i/dscr
    cat /sys/devices/system/cpu/cpu$i/dscr
    i=$$i+4
    done
    =======================

    For example, "setdscr.sh 0x14" will set all dscr values to 0x14.
    The brackets were ignored in the previous posting.

    The while loop should be:

    while [ $i -lt 128 ]
    do
    echo $1 > /sys/devices/system/cpu/cpu$i/dscr
    cat /sys/devices/system/cpu/cpu$i/dscr
    i=$[$i+4]
    done
  • wpeter
    wpeter
    5 Posts

    Re: Is there documentation on using ppc64_cpu --dscr ?

    ‏2010-05-19T21:07:15Z  
    • wpeter
    • ‏2010-05-14T15:37:06Z
    The brackets were ignored in the previous posting.

    The while loop should be:

    while [ $i -lt 128 ]
    do
    echo $1 > /sys/devices/system/cpu/cpu$i/dscr
    cat /sys/devices/system/cpu/cpu$i/dscr
    i=$[$i+4]
    done
    ppc64_cpu has just been fixed.

    We can download the powerpc_utils source from http://sourceforge.net/projects/powerpc-utils/ and rebuild the tools.
  • SystemAdmin
    SystemAdmin
    706 Posts

    Re: Is there documentation on using ppc64_cpu --dscr ?

    ‏2010-05-20T03:14:30Z  
    • wpeter
    • ‏2010-05-19T21:07:15Z
    ppc64_cpu has just been fixed.

    We can download the powerpc_utils source from http://sourceforge.net/projects/powerpc-utils/ and rebuild the tools.
    Be sure to download the source, see easy instructions at

    http://www.ibm.com/developerworks/wikis/display/LinuxP/powerpc-utils

    Eventually the fixes will get wrapped into the download tar ball.