NB M7-8 per corecluster calculation (L3 cache aware)

SUN_logo2_smallDo-not-forget 😉 Very dirty shit for LDOMprimary domain with CPU intensive workload profile also with 2nd Guest Root dom.

#!/bin/bash
# per-corecluster spreading cores on cpu
# m7-8, 1pdom, 2ldom (primary root+guest root domain)
# 

cid=0           # 1st cid (possible shift when using explict control domain)
factor=1        # spreading core factor
coreshift=4     # shift into corecluster
echo "# per-core-cluster config for primary"
echo -n "ldm set-core cid="
while [ $cid -le 511 ] ; do 
        let n0cid=cid           # 1st
        let n1cid=cid+factor*1  # 2nd
        let n2cid=cid+factor*2  # 3..
        let n3cid=cid+factor*3  # 4...
        let n4cid=cid+factor*4+coreshift
        let n5cid=cid+factor*5+coreshift
        let n6cid=cid+factor*6+coreshift
        let n7cid=cid+factor*7+coreshift
        let cid=cid+64 
        echo -n "$n0cid,$n1cid,$n2cid,$n3cid,$n4cid,$n5cid,$n6cid,$n7cid"
        [ $cid -lt 511 ] && echo -n "," 
done
echo " primary"
echo "# check with lgrinfo after rebooting "

guest next…

#!/bin/bash
# per-corecluster spreading cores on cpu
# m7-8, 1pdom, 2ldom (primary root+guest root domain)
# 

cid=0            # 1st cid (possible shift when using explict control domain)

echo "# per-core-cluster config for dom1"
echo -n "ldm set-core cid="
while [ $cid -le 511 ] ; do
        let i=0
        while [ $i -lt 4 ] ; do # use 4 core-cluster per CMP
                let k=0
                while [ $k -lt 4 ] ; do # 4 core ...
                        let tmp=$cid+16+$i*8+$k # 16 cc shift 8 number of possible cores
                        echo -n $tmp
                        echo -n ","
                        let k++
                done
                let i++
        done
        let cid=cid+64 # next CMP
#        [ $cid -lt 511 ] && echo -n "," 
done
echo " dom1"
echo "# check with lgrinfo after rebooting "

Leave a Reply