Sultan Alsawaf 7af781c785 soc: qcom: watchdog_v2: Optimize IPI pings to reduce system jitter
Sending synchronous IPIs to other CPUs involves spinning with preemption
disabled in order to wait for each IPI to finish. Keeping preemption off
for long periods of time like this is bad for system jitter, not to mention
the watchdog's IPIs are sent and flushed one at a time for each CPU rather
than all at once for all the CPUs to be pinged.

Since the existing IPI ping machinery is quite lacking, rewrite it entirely
to address all of its performance shortcomings. This not only replaces the
synchronous IPIs with asynchronous ones, but also allows the IPIs to run in
parallel. The IPI ping and wait mechanisms are now much more efficient via
the use of generic_exec_single() (since smp_call_function_single_async()
disables preemption when all it really needs is migration disabled), and
by sleeping rather than spinning while waiting for the IPIs to finish.

This also does away with the ping_start and ping_end arrays as they don't
make sense with the parallel, asynchronous execution of the IPIs anymore.
They are instead replaced by a mask indicating which CPUs were pinged so
that a watchdog bark can still print out which CPU(s) stopped responding.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
2022-09-21 01:43:09 +05:30
..
2020-07-09 11:15:36 +02:00
2020-05-03 08:51:19 +02:00
2019-12-01 09:14:03 +01:00
2021-05-25 19:26:37 +05:30
2020-01-13 19:40:11 +00:00
2019-08-19 12:42:20 -07:00
2020-04-02 16:34:20 +02:00
2019-08-12 13:29:46 -04:00
2020-05-20 08:16:58 +02:00