Re: [tip: sched/core] x86, sched: Add support for frequency invariance

From: Chris Wilson
Date: Tue Mar 31 2020 - 14:34:11 EST


Quoting Giovanni Gherdovich (2020-03-31 19:11:25)
> Hello Chris,
>
> thank you for catching this problem and sorry for the mess.
>
> Until your message I wasn't aware that CPU0 can be hotplugged, but now that I
> check the feature is been there since v3.8 :/
>
> The code assumes cpu0 is always there and I need to fix that.
>
> It seems your report comes from executing an automated test suite, can you
> give me a link to the test sources and a hint on how to run it? I'd like to
> reproduce locally so that I make sure I correctly address this problem.

https://gitlab.freedesktop.org/drm/igt-gpu-tools/

It's an i915 test (so expects i915 running and root access to your
machine, with the intent of breaking your machine), but the cpu
hotplugging could be extracted

https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/blob/master/tests/perf_pmu.c#L1153

since it's basically doing:
i = 0
while :; do
test -e /sys/devices/system/cpu/cpu$i/online || break

echo 0 > /sys/devices/system/cpu/cpu$i/online
sleep .1
echo 1 > /sys/devices/system/cpu/cpu$i/online

i = $[[ $i + 1 ]]
done
dmesg

Possibly running that under perf stat to keep perf_event_open, or
something else that hooks up the perf cpu hotplug callbacks.

Hope that helps,
-Chris