summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMartin Schwidefsky2015-09-10 11:18:20 +0200
committerMartin Schwidefsky2015-09-17 13:43:43 +0200
commit61cc37906b45534fcc2bea03c17e135ec010b624 (patch)
tree9a37958a4a478a8d95abdc4cbd65dbdde1976d2d /tools
parents390/cpum_cf: Corrected return code for unauthorized counter sets (diff)
downloadkernel-qcow2-linux-61cc37906b45534fcc2bea03c17e135ec010b624.tar.gz
kernel-qcow2-linux-61cc37906b45534fcc2bea03c17e135ec010b624.tar.xz
kernel-qcow2-linux-61cc37906b45534fcc2bea03c17e135ec010b624.zip
s390/vtime: correct scaled cputime for SMT
The scaled cputime is supposed to be derived from the normal per-thread cputime by dividing it with the average thread density in the last interval. The calculation of the scaling values for the average thread density is incorrect. The current, incorrect calculation: Ci = cycle count with i active threads T = unscaled cputime, sT = scaled cputime sT = T * (C1 + C2 + ... + Cn) / (1*C1 + 2*C2 + ... + n*Cn) The calculation happens to yield the correct numbers for the simple cases with only one Ci value not zero. But for cases with multiple Ci values not zero it fails. E.g. on a SMT-2 system with one thread active half the time and two threads active for the other half of the time it fails, the scaling factor should be 3/4 but the formula gives 2/3. The correct formula is sT = T * (C1/1 + C2/2 + ... + Cn/n) / (C1 + C2 + ... + Cn) Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions