summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorTao Cui <cuitao@kylinos.cn>2026-07-20 17:37:26 +0800
committerJens Axboe <axboe@kernel.dk>2026-08-03 20:03:20 -0600
commit482fc257de95ab181688e9d1dfcc6b6a58857b1e (patch)
treeb9d18cceac455517765cf1aff36799e190744d1c /block
parent4e050c5b92c1600415b2cd452583e543036f3d73 (diff)
block/kyber-iosched: flush per-cpu latency buckets over possible CPUs
kyber_timer_fn() sums the per-cpu latency histograms with for_each_online_cpu(). A CPU that goes offline mid-interval leaves its bucket un-flushed; the samples are lost from the current decision and re-appear (stale) when the CPU is onlined again. Fixes: 6e25cb01ea20 ("kyber: implement improved heuristics") Signed-off-by: Tao Cui <cuitao@kylinos.cn> Reviewed-by: Yu Kuai <yukuai@fygo.io> Link: https://patch.msgid.link/20260720093726.28965-5-cui.tao@linux.dev Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/kyber-iosched.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/kyber-iosched.c b/block/kyber-iosched.c
index 971818bcdc9d..2ee552ab8135 100644
--- a/block/kyber-iosched.c
+++ b/block/kyber-iosched.c
@@ -275,7 +275,7 @@ static void kyber_timer_fn(struct timer_list *t)
bool bad = false;
/* Sum all of the per-cpu latency histograms. */
- for_each_online_cpu(cpu) {
+ for_each_possible_cpu(cpu) {
struct kyber_cpu_latency *cpu_latency;
cpu_latency = per_cpu_ptr(kqd->cpu_latency, cpu);