x y
0.000 26.397
1.150 23.553
2.627 20.856
3.096 18.919
4.228 15.246
5.721 12.958
7.018 9.286
8.540 5.613
9.703 3.820
11.393 3.777
14.048 3.777
16.612 3.267
19.718 3.267
21.291 4.792
22.373 4.824
24.577 4.824
26.553 3.544
28.950 3.544
30.956 4.462
32.871 4.419
35.754 3.777
38.379 3.777
41.229 3.777
43.236 4.695
45.209 4.451
47.188 4.695
49.164 4.695
51.454 4.261
53.600 4.695
55.601 4.261
57.355 4.695
59.812 4.261
61.051 5.337
62.239 7.334
62.997 8.091
64.050 9.494
65.426 9.971
66.901 11.330
67.853 12.449
69.495 14.084
70.283 14.967
72.484 16.846
74.883 17.764
77.673 17.807
80.133 17.807
82.788 18.725
85.187 20.605
86.484 22.527
87.812 25.005
89.560 26.885
91.505 28.721
93.905 30.557
96.785 29.596
98.536 27.760
100.000 26.842
cgit.png' alt='cgit logo'/>
x86/mce: Make timer handling more robust
Erik reported that on a preproduction hardware a CMCI storm triggers the
BUG_ON in add_timer_on(). The reason is that the per CPU MCE timer is
started by the CMCI logic before the MCE CPU hotplug callback starts the
timer with add_timer_on(). So the timer is already queued which triggers
the BUG.
Using add_timer_on() is pretty pointless in this code because the timer is
strictlty per CPU, initialized as pinned and all operations which arm the
timer happen on the CPU to which the timer belongs.
Simplify the whole machinery by using mod_timer() instead of add_timer_on()
which avoids the problem because mod_timer() can handle already queued
timers. Use __start_timer() everywhere so the earliest armed expiry time is
preserved.
Reported-by: Erik Veijola <erik.veijola@intel.com>
Tested-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Borislav Petkov <bp@alien8.de>
Cc: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1701310936080.3457@nanos
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>