RE: [PATCH 1/8] perf/x86/intel: Fix memory corruption

From: DSouza, Nelson
Date: Thu Mar 21 2019 - 19:16:18 EST


Attached cpu hotplug test output while perf is running in the background. No WARN messages seen.

When I run the kexec command, it boots to bios. Haven't used kexec before. Still trying to figure that one out.

-----Original Message-----
From: Peter Zijlstra [mailto:peterz@xxxxxxxxxxxxx]
Sent: Thursday, March 21, 2019 1:07 PM
To: DSouza, Nelson <nelson.dsouza@xxxxxxxxx>
Cc: Tony Jones <tonyj@xxxxxxxx>; Thomas Gleixner <tglx@xxxxxxxxxxxxx>; Stephane Eranian <eranian@xxxxxxxxxx>; Ingo Molnar <mingo@xxxxxxxxxx>; Jiri Olsa <jolsa@xxxxxxxxxx>; LKML <linux-kernel@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH 1/8] perf/x86/intel: Fix memory corruption

On Thu, Mar 21, 2019 at 07:47:50PM +0000, DSouza, Nelson wrote:
> Is the request to check whether the msr gets reset to default upon reboot of the machine ?

basically:

- apply patch
- start workload with 4 counter (on all CPUs), such that tfa-msr=1
- try the following:
o cpu hotplug
o kexec

to see if the new WARN will trigger -- it should not.

root@jf1-otc-3AR3-33:~# cat /sys/devices/cpu/allow_tsx_force_abort
1
root@jf1-otc-3AR3-33:~# perf stat -e cs,'{cache-misses,cache-references,branches,branch-misses}' --no-merge -a sleep 60 &
[1] 3025
root@jf1-otc-3AR3-33:~# echo 0 > /sys/devices/system/cpu/cpu4/online
root@jf1-otc-3AR3-33:~# echo 0 > /sys/devices/system/cpu/cpu5/online
root@jf1-otc-3AR3-33:~# echo 0 > /sys/devices/system/cpu/cpu6/online
root@jf1-otc-3AR3-33:~# echo 0 > /sys/devices/system/cpu/cpu7/online
root@jf1-otc-3AR3-33:~#
Performance counter stats for 'system wide':

4,800 cs
<not counted> cache-misses
<not counted> cache-references
<not counted> branches
<not counted> branch-misses

60.009098150 seconds time elapsed



[1]+ Done perf stat -e cs,'{cache-misses,cache-references,branches,branch-misses}' --no-merge -a sleep 60