Skip to content

block/blk-iolatency: fix always-zero cur_stat mean on non-SSD - #1215

Closed
ghost wants to merge 1 commit into
linus-master_basefrom
series/1157639=>linus-master
Closed

ghost wants to merge 1 commit into
linus-master_basefrom
series/1157639=>linus-master

Conversation

@ghost

@ghost ghost commented Sep 4, 2026

Copy link
Copy Markdown

Pull request for series with
subject: block/blk-iolatency: fix always-zero cur_stat mean on non-SSD
version: 3
url: https://patchwork.kernel.org/project/linux-block/list/?series=1157639

@ghost

ghost commented Sep 4, 2026

Copy link
Copy Markdown
Author

Upstream branch: bc35965
series: https://patchwork.kernel.org/project/linux-block/list/?series=1157639
version: 3

@ghost
ghost force-pushed the linus-master_base branch from 8242bf1 to 5b28f57 Compare September 7, 2026 02:54
@ghost

ghost commented Sep 7, 2026

Copy link
Copy Markdown
Author

Upstream branch: df29080
series: https://patchwork.kernel.org/project/linux-block/list/?series=1157639
version: 3

@ghost
ghost force-pushed the series/1157639=>linus-master branch from b571268 to 7e18d47 Compare September 7, 2026 04:21
@ghost ghost closed this Sep 7, 2026
@ghost ghost reopened this Sep 8, 2026
@ghost

ghost commented Sep 8, 2026

Copy link
Copy Markdown
Author

Upstream branch: 28924df
series: https://patchwork.kernel.org/series/1157639/
version: 3

@ghost
ghost force-pushed the series/1157639=>linus-master branch from 7e18d47 to 0452dcb Compare September 8, 2026 15:22
@ghost
ghost force-pushed the linus-master_base branch from 4ddd216 to 00cc4ca Compare September 9, 2026 07:40
@ghost

ghost commented Sep 9, 2026

Copy link
Copy Markdown
Author

Upstream branch: 893e117
series: https://patchwork.kernel.org/series/1157639/
version: 3

@ghost
ghost force-pushed the series/1157639=>linus-master branch from 0452dcb to 7e96de5 Compare September 9, 2026 07:42
@ghost
ghost force-pushed the linus-master_base branch from 00cc4ca to 7efd8cd Compare September 10, 2026 15:29
@ghost

ghost commented Sep 10, 2026

Copy link
Copy Markdown
Author

Upstream branch: 50d05c7
series: https://patchwork.kernel.org/series/1157639/
version: 3

@ghost
ghost force-pushed the series/1157639=>linus-master branch from 7e96de5 to 3073b40 Compare September 10, 2026 15:31
@ghost
ghost force-pushed the linus-master_base branch from 7efd8cd to a0aeca9 Compare September 12, 2026 02:26
@ghost

ghost commented Sep 12, 2026

Copy link
Copy Markdown
Author

Upstream branch: 5225b8e
series: https://patchwork.kernel.org/series/1157639/
version: 3

@ghost
ghost force-pushed the series/1157639=>linus-master branch from 3073b40 to 23e907c Compare September 12, 2026 02:44
@ghost
ghost force-pushed the linus-master_base branch from a0aeca9 to 772381e Compare September 13, 2026 08:50
@ghost

ghost commented Sep 13, 2026

Copy link
Copy Markdown
Author

Upstream branch: 2f0c1cf
series: https://patchwork.kernel.org/series/1157639/
version: 3

@ghost
ghost force-pushed the series/1157639=>linus-master branch from 23e907c to 236a5ef Compare September 13, 2026 10:13
@ghost
ghost force-pushed the linus-master_base branch from 772381e to 0224dee Compare September 13, 2026 22:56
@ghost

ghost commented Sep 13, 2026

Copy link
Copy Markdown
Author

Upstream branch: 2f0c1cf
series: https://patchwork.kernel.org/series/1157639/
version: 3

@ghost
ghost force-pushed the series/1157639=>linus-master branch from 236a5ef to 5a88a45 Compare September 13, 2026 23:15
@ghost ghost added the V3-ci-pass label Sep 15, 2026
@ghost
ghost force-pushed the linus-master_base branch from 0224dee to f14340f Compare September 15, 2026 09:28
@ghost

ghost commented Sep 15, 2026

Copy link
Copy Markdown
Author

Upstream branch: 5878583
series: https://patchwork.kernel.org/series/1157639/
version: 3

@ghost
ghost force-pushed the series/1157639=>linus-master branch from 5a88a45 to 4f0a6c7 Compare September 15, 2026 09:51
@ghost
ghost force-pushed the linus-master_base branch from c65e2dc to 2414e80 Compare September 24, 2026 07:23
@ghost

ghost commented Sep 24, 2026

Copy link
Copy Markdown
Author

Upstream branch: f010036
series: https://patchwork.kernel.org/series/1157639/
version: 3

@ghost
ghost force-pushed the series/1157639=>linus-master branch from 6eebdbd to b3b0590 Compare September 24, 2026 08:12
@ghost
ghost force-pushed the linus-master_base branch from 2414e80 to 38f4bbb Compare September 24, 2026 14:23
@ghost

ghost commented Sep 24, 2026

Copy link
Copy Markdown
Author

Upstream branch: f49a343
series: https://patchwork.kernel.org/series/1157639/
version: 3

@ghost
ghost force-pushed the series/1157639=>linus-master branch from b3b0590 to b812d38 Compare September 24, 2026 15:20
@ghost
ghost force-pushed the linus-master_base branch from 38f4bbb to 372fcdc Compare September 26, 2026 07:53
@ghost

ghost commented Sep 26, 2026

Copy link
Copy Markdown
Author

Upstream branch: 6812ce4
series: https://patchwork.kernel.org/series/1157639/
version: 3

@ghost
ghost force-pushed the series/1157639=>linus-master branch from b812d38 to c067119 Compare September 26, 2026 08:36
@ghost
ghost force-pushed the linus-master_base branch from 372fcdc to c6537fe Compare September 28, 2026 14:39
@ghost

ghost commented Sep 28, 2026

Copy link
Copy Markdown
Author

Upstream branch: 72d3fcf
series: https://patchwork.kernel.org/series/1157639/
version: 3

@ghost
ghost force-pushed the series/1157639=>linus-master branch from c067119 to 904b78a Compare September 28, 2026 15:28
@ghost ghost added V3-ci-pass and removed V3-ci-fail labels Sep 30, 2026
@ghost
ghost force-pushed the linus-master_base branch from c6537fe to eebb5bc Compare October 1, 2026 15:18
@ghost

ghost commented Oct 1, 2026

Copy link
Copy Markdown
Author

Upstream branch: 551c722
series: https://patchwork.kernel.org/series/1157639/
version: 3

@ghost
ghost force-pushed the series/1157639=>linus-master branch from 904b78a to 118d7df Compare October 1, 2026 16:57
@ghost
ghost force-pushed the linus-master_base branch from eebb5bc to bbd3af0 Compare October 1, 2026 23:18
@ghost

ghost commented Oct 1, 2026

Copy link
Copy Markdown
Author

Upstream branch: ce1e022
series: https://patchwork.kernel.org/series/1157639/
version: 3

@ghost
ghost force-pushed the series/1157639=>linus-master branch from 118d7df to 07f1099 Compare October 1, 2026 23:59
@ghost
ghost force-pushed the linus-master_base branch from bbd3af0 to a9c0b46 Compare October 3, 2026 09:37
@ghost

ghost commented Oct 3, 2026

Copy link
Copy Markdown
Author

Upstream branch: e767a4e
series: https://patchwork.kernel.org/series/1157639/
version: 3

@ghost
ghost force-pushed the series/1157639=>linus-master branch from 07f1099 to 47daea2 Compare October 3, 2026 10:23
@ghost
ghost force-pushed the linus-master_base branch from a9c0b46 to 72d0f5e Compare October 3, 2026 21:50
@ghost

ghost commented Oct 3, 2026

Copy link
Copy Markdown
Author

Upstream branch: a74306e
series: https://patchwork.kernel.org/series/1157639/
version: 3

iolatency_check_latencies() accumulates the per-window latency stat
into iolat->cur_stat via latency_stat_sum(), which for non-SSD devices
calls blk_rq_stat_sum().  But blk_rq_stat_sum() is contracted on a raw
per-cpu src: it folds src->batch into the new mean.  By the time the
per-window stat reaches cur_stat it is already aggregated, with batch
left at 0.  Each window therefore contributes zero latency to
cur_stat->mean, which on non-SSD devices stays at 0; the
latency_sum_ok(&cur_stat) check that gates scaling up is always true,
so the scale-up hysteresis never engages.  SSD devices use the
percentile path and are unaffected.

Add latency_stat_merge(), which merges two already-aggregated stats by
their reconstructed totals (mean * nr_samples) instead of src->batch,
and use it only for the cur_stat accumulation; the earlier per-cpu sum
keeps latency_stat_sum(), whose src is still raw.

Fixes: d706751 ("block: introduce blk-iolatency io controller")
Signed-off-by: Tao Cui <cuitao@kylinos.cn>
@ghost
ghost force-pushed the series/1157639=>linus-master branch from 47daea2 to 80c2fd9 Compare October 3, 2026 22:31
@ghost

ghost commented Oct 4, 2026

Copy link
Copy Markdown
Author

At least one diff in series https://patchwork.kernel.org/series/1157639/ irrelevant now for [{'archived': False, 'project': 241}] search patterns

@ghost ghost closed this Oct 4, 2026
@ghost
ghost deleted the series/1157639=>linus-master branch October 6, 2026 07:17
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants