diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2019-05-27 22:55:16 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-06-12 10:47:03 +0200 |
commit | 3c2e79f4cef7938125b356e7f5c8fd038212619a (patch) | |
tree | cfd53f33ed21b4e585e7c222dbb6f7a71043c8e1 /kernel/irq/internals.h | |
parent | genirq/timings: Fix timings buffer inspection (diff) | |
download | linux-dev-3c2e79f4cef7938125b356e7f5c8fd038212619a.tar.xz linux-dev-3c2e79f4cef7938125b356e7f5c8fd038212619a.zip |
genirq/timings: Optimize the period detection speed
With a minimal period and if there is a period which is a multiple of it
but lesser than the max period then it will be detected before and the
minimal period will be never reached.
1 2 1 2 1 2 1 2 1 2 1 2
<-----> <-----> <----->
<-> <-> <-> <-> <-> <->
In that case, the minimum period is 2 and the maximum period is 5. That
means all repeating pattern of 2 will be detected as repeating pattern of
4, it is pointless to go up to 2 when searching for the period as it will
always fail.
Remove one loop iteration by increasing the minimal period to 3.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: andriy.shevchenko@linux.intel.com
Link: https://lkml.kernel.org/r/20190527205521.12091-4-daniel.lezcano@linaro.org
Diffstat (limited to 'kernel/irq/internals.h')
0 files changed, 0 insertions, 0 deletions