From: Kunhai Dai <daikunhai@didiglobal.com>
To: <tj@kernel.org>
Cc: <axboe@kernel.dk>, <josef@toxicpanda.com>, <yukuai@fygo.io>,
<cui.tao@linux.dev>, <cgroups@vger.kernel.org>,
<linux-block@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<rostedt@goodmis.org>, <mhiramat@kernel.org>,
<mathieu.desnoyers@efficios.com>,
<linux-trace-kernel@vger.kernel.org>
Subject: [PATCH v2 0/2] blk-iocost: fix hweight cache publication and donation fail-safe
Date: Mon, 19 Oct 2026 08:54:10 -0400 [thread overview]
Message-ID: <20261019125412.3123895-1-daikunhai@didiglobal.com> (raw)
This series fixes the blk-iocost hweight cache publication race and adds a
fail-safe for invalid donation weights.
Previous version:
https://lists.openwall.net/linux-kernel/2026/10/15/1954
Replies:
https://lists.openwall.net/linux-kernel/2026/10/16/1431
https://lists.openwall.net/linux-kernel/2026/10/16/2798
Changes since v1:
- split into two patches: the donation fail-safe and the atomic cache;
- add the Fixes tags agreed on the list (e08d02aa5fc9, 7caa47151ab2) and
Cc stable on the fail-safe;
- drop the donating > 1 guard, which only changed the value printed by the
warning;
- do not add max(after, 1): the no-race path has not been shown to be
reachable and the total budget invariant has not been re-validated;
- use GENMASK/FIELD_PREP/FIELD_GET helpers for the packed cache;
- have tracepoints decode the packed cache without refreshing it, and only
evaluate that read when the tracepoint is enabled;
- explain the activation-time cache update;
- update iocost_monitor.py;
- document the AI-assisted work.
The no-race invalid-weight path is still under investigation: a hand-built
input can trigger the divide at the function level, but runtime
reachability has not been demonstrated. The first patch is therefore a
fail-safe, not a claim that the path is reachable without a race.
Kunhai Dai (2):
blk-iocost: abort weight transfer on invalid donation weights
blk-iocost: publish hweights as one atomic value
block/blk-iocost.c | 111 +++++++++++++++++++++++++++------
include/trace/events/iocost.h | 7 ++-
tools/cgroup/iocost_monitor.py | 7 ++-
3 files changed, 101 insertions(+), 24 deletions(-)
--
2.27.0
next reply other threads:[~2026-10-19 12:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 12:54 Kunhai Dai [this message]
2026-10-19 12:54 ` [PATCH v2 1/2] blk-iocost: abort weight transfer on invalid donation weights Kunhai Dai
2026-10-19 12:54 ` [PATCH v2 2/2] blk-iocost: publish hweights as one atomic value Kunhai Dai
2026-10-19 23:12 ` [PATCH v2 0/2] blk-iocost: fix hweight cache publication and donation fail-safe Tejun Heo
2026-10-20 9:16 ` Tao Cui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261019125412.3123895-1-daikunhai@didiglobal.com \
--to=daikunhai@didiglobal.com \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=cui.tao@linux.dev \
--cc=josef@toxicpanda.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--cc=tj@kernel.org \
--cc=yukuai@fygo.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox