From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796385217; b=VSC3zM1Z5VbthrGn8wyh/z5EMg9Rr4YsGDoYIfhkoI0hacILtLOcHPhyx+OkCKiYuY5j DT12ISTSqtlqAftoMqmFEYB5gQvUR5FcX9CmX3+K2tcNyhx6YBdMRE3HmbPIRIS9NzG/Y Z+vMQAruvneGPnLR1eEWPtCvFB7Ub3erVHM5dUAFYDJzx1CX6xfxUwqklRfzCQbtSIGR4 h/g5QMemX3yyU/25724wna3rW8gorhexwLIjC27pJqsqmI8GrGp6uZfX5BrQ1hHkdtdqR KrKy1gtsZSt60D1zMoP4XLw9aISrU1DQ894o6w+awtCxwTORHc3TOQpSsAblgD3mG9Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796385217; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=Y5fmJpvRQ/lhmPE5MIfnbS9FOYVjwKmsJPcXrmmBpzk=; b=sSFYK/7mHJiEvKIGmeuXR8bB/3htiE7vhssQBdgA1t0VhRIPqunj9ZuJowGEJxapNGSC yaaxTpgScLZHVyie36nshftO4aDTZ8Wou4qc0gv1keRE6zElCbqqPIagSHTqrQMQ62U82 pVck+hqSdV9OjsvsExtjZUo6ZBUJgvV37Q/IgsD9Rr57nqLmOqv/m8WmF1uB0Ok6EojL6 aDWbZlYCCqJIK9axNV6bi38Cant++5HcXPhUOt54MOQvFiboT3Nr0uHbg4YvGFnoowHiD L6xLHpMLgfO6SojijPR0ABRr7Tkpa/PT+OzQ7a7yNuTpMC5KncM4edc2y2TVY980WTg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=h8hqVtY7; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C05F606A32C; Fri, 4 Dec 2026 11:53:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=h8hqVtY7 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F2A81F000CE; Fri, 4 Dec 2026 11:53:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796385216; bh=Y5fmJpvRQ/lhmPE5MIfnbS9FOYVjwKmsJPcXrmmBpzk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=h8hqVtY7D+QMpb3LsgfNc9EI+tdbO8j6QOIbOA+zkCvxVtf1ozEeDMhD1Fjbe4i+Y XC2Ub64D2oYaYa1NdK5O2rJNoiEnRY2+Bh+BzFWq3/KcekNyWfbpEg+OilLzudXFg4 BPCBgL9B556Fdq+NBX4xkHijWPvvjga0oWW9suf8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Tejun Heo , Josef Bacik , Jens Axboe , Sasha Levin Subject: [PATCH 6.6 0468/1167] blk-throttle: pass the I/O counts of a dead group on Date: Fri, 4 Dec 2026 18:58:15 +0900 Message-ID: <20261204100714.207638020@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Josef Bacik [ Upstream commit 587edb931fdda032bcd63fdfb0db4ded75159ee9 ] The recursive io_service_bytes and io_serviced files sum up the online groups plus what dead descendants left in aux_cnt. That worked while the counters lived in the blkg. Since commit 7ca464383aec they're in the throtl_grp and nobody passes them up, so the files go backwards when a child is removed. Add them to the parent in throtl_pd_offline(). Fixes: 7ca464383aec ("blk-throtl: stop using blkg->stat_bytes and ->stat_ios") Cc: Tejun Heo Signed-off-by: Josef Bacik Acked-by: Tejun Heo Link: https://patch.msgid.link/20261028164415.1262013-26-axboe@kernel.dk Signed-off-by: Jens Axboe [ sashal: added the parent-counter transfer to the existing throtl_pd_offline() instead, since this tree has no tg_flush_bios() or THROTL_TG_CANCELING handling for the upstream context. ] Signed-off-by: Sasha Levin --- block/blk-throttle.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/block/blk-throttle.c b/block/blk-throttle.c index a765db9fc46da..aee16769b3348 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -474,6 +474,7 @@ static void throtl_upgrade_state(struct throtl_data *td); static void throtl_pd_offline(struct blkg_policy_data *pd) { struct throtl_grp *tg = pd_to_tg(pd); + struct throtl_grp *parent = blkg_to_tg(tg_to_blkg(tg)->parent); tg->bps[READ][LIMIT_LOW] = 0; tg->bps[WRITE][LIMIT_LOW] = 0; @@ -484,6 +485,14 @@ static void throtl_pd_offline(struct blkg_policy_data *pd) if (!tg->td->limit_valid[tg->td->limit_index]) throtl_upgrade_state(tg->td); + + /* the recursive files of the ancestors go on counting what it did */ + if (parent) { + blkg_rwstat_add_aux(&parent->stat_bytes, &tg->stat_bytes); + blkg_rwstat_add_aux(&parent->stat_ios, &tg->stat_ios); + blkg_rwstat_reset(&tg->stat_bytes); + blkg_rwstat_reset(&tg->stat_ios); + } } static void tg_release(struct rcu_head *rcu) -- 2.53.0