From nobody Fri Sep 25 22:18:48 2026 Received: from mta0.migadu.com (out-215.mta0.migadu.com [91.218.175.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA4742D9ECB for ; Tue, 8 Sep 2026 02:22:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.215 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788834124; cv=none; b=BLj7XrHdx6WE7vtUkACIGjLnC6YUrvKlz9/qnfPfrv6uLgpJ/ka9ITe/UDbnIkhvAB5Q2lrH21eDiHq/pdWVAL0QJjymyEHZJAlIzzTMxXvSJFQH0Tix0vp9bZbKMKhYmMuYdTdpuN9TqUP/8NCpEmcZ/LED37lYDozUYy4ypuA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788834124; c=relaxed/simple; bh=pWO4RZatUqrPA6r4dQjv9yyaw0w7zdsYNSyi6AjSt+Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hZqTY+1V4iXLRLuZYjhuLx8TKh+SY6cgpvR5tc7h52fpyP95F7t7vNTEJbd+7n6IA9dLEIbm94slcW/DBxipnUL3oFEABt1/SFjAmBvHva27lSS8nD9AX11F8JgXU+8q7kMhn43C8B3LyXp3urKnupML/WlkZXpRzvQ2TJyaDA0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=TVskdhzf; arc=none smtp.client-ip=91.218.175.215 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="TVskdhzf" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=pWO4RZatUqrPA6r4dQjv9yyaw0w7zdsYNSyi6AjSt+Q=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1788834119; v=1; x=1789438919; b=TVskdhzfKQrLKD4J0X68ckG0Ci8e8tkt1ywDoKHXxUsd0ikdoYapKy6fAh1pcEcVgrCOSiU7 TdP9NT7yHinDx5YpseE8jtK24IYjjuH9xmXykWeZvbjnnzYZ94NaH9fMnCPj41104dn9dFZKAEl jeddX1z8Nx9kzMaQPIg+iMao= X-Envelope-To: linux-kernel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 25ba49c4d1d890a5; Tue, 08 Sep 2026 02:21:59 +0000 X-Mizu-Trace-ID: 25ba49c4d1d890a5 X-Migadu-Flow: FLOW_OUT From: Tao Cui To: tj@kernel.org, josef@toxicopanda.com, axboe@kernel.dk Cc: cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, cui.tao@linux.dev, Tao Cui Subject: [PATCH 1/4] blk-iocost: charge flushes as pageless random writes Date: Tue, 8 Sep 2026 10:21:32 +0800 Message-ID: <20260908022135.1429281-2-cui.tao@linux.dev> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260908022135.1429281-1-cui.tao@linux.dev> References: <20260908022135.1429281-1-cui.tao@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Tao Cui Standalone flushes issued by blkdev_issue_flush() are represented as dataless REQ_OP_WRITE | REQ_PREFLUSH bios, which calc_vtime_cost_builtin() prices at zero. The flush component of flush-heavy workloads such as database commits, journal flushes, and metadata sync is thus neither charged nor throttled: a cgroup at 1% weight can issue ~510k flushes per 12s, monopolizing the device while iocost reports zero usage. Price them as pageless random writes (LCOEF_WRANDIO), which provides an approximation of the device time consumed by a flush. For profiles where WRANDIO clamps to zero (ssd_dfl / ssd_fast), use a one-page floor (LCOEF_WPAGE). After this patch, the same 1%-weight cgroup is limited to 24 flushes per 12s; on ext4, write+fsync workloads are correctly accounted through the journal layer (~2.2us per flush on the ssd_fast profile). Fixes: 7caa47151ab2 ("blkcg: implement blk-iocost") Signed-off-by: Tao Cui --- block/blk-iocost.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/block/blk-iocost.c b/block/blk-iocost.c index 2745bffcd5ee..abc512532ed9 100644 --- a/block/blk-iocost.c +++ b/block/blk-iocost.c @@ -2533,8 +2533,8 @@ static void calc_vtime_cost_builtin(struct bio *bio, = struct ioc_gq *iocg, u64 seek_pages =3D 0; u64 cost =3D 0; =20 - /* Can't calculate cost for empty bio */ - if (!bio->bi_iter.bi_size) + /* Dataless WRITE|REQ_PREFLUSH (standalone flush) is priced below */ + if (!bio->bi_iter.bi_size && !(bio->bi_opf & REQ_PREFLUSH)) goto out; =20 switch (bio_op(bio)) { @@ -2544,6 +2544,15 @@ static void calc_vtime_cost_builtin(struct bio *bio,= struct ioc_gq *iocg, coef_page =3D ioc->params.lcoefs[LCOEF_RPAGE]; break; case REQ_OP_WRITE: + if (!bio->bi_iter.bi_size) { + /* + * dataless WRITE|REQ_PREFLUSH: standalone flush; + * at least one page so fast profiles still charge + */ + cost =3D max(ioc->params.lcoefs[LCOEF_WRANDIO], + ioc->params.lcoefs[LCOEF_WPAGE]); + goto out; + } coef_seqio =3D ioc->params.lcoefs[LCOEF_WSEQIO]; coef_randio =3D ioc->params.lcoefs[LCOEF_WRANDIO]; coef_page =3D ioc->params.lcoefs[LCOEF_WPAGE]; --=20 2.43.0 From nobody Fri Sep 25 22:18:48 2026 Received: from mta0.migadu.com (out-220.mta0.migadu.com [91.218.175.220]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3367E33C19E for ; Tue, 8 Sep 2026 02:22:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.220 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788834127; cv=none; b=fA0uEwFoUIwLb9vbf+5+YHTps4lz9QWvwgDerNSwOgs9DxnX/eIqQHq3W490tEJanOaWpbpTh8LF0nbKe3ENZARMc3e6H4tApBPKjrzZI+SNLkf0g9lamKwJ+n8tJ5bnUB6Xq/KHFvokAuIB0oDa7oq5eFQhKEGcYXK+AlLAiUg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788834127; c=relaxed/simple; bh=RlLZG9DF6LMhq752V92mo173s8ccnTQNr43ipFQvvoo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Cyn0VOZbQOWKgCRlplDzpfVdZffeDFoGRIuFWBBzMhRVwCt2CdBNR38JtHpH6NCsNp7McFs0A9+k3EAZVW1M5CWaRW9mbjxZeWlX++GHerojr5oAi9HYDCaLa+Hkq9VSPLY0bzd6EexVSfNuimeRpIUFU5yRr9Ls8oDaci3Snns= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=MoRFccNJ; arc=none smtp.client-ip=91.218.175.220 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="MoRFccNJ" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=RlLZG9DF6LMhq752V92mo173s8ccnTQNr43ipFQvvoo=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1788834124; v=1; x=1789438924; b=MoRFccNJtw9FXGRQz2iJn/dFpgWkGqRUnSvMH86oAAG/7sX6gKiw0mPCYH2wTuyiH8NEQSpJ wp8kJri79LhY1tJJHWJ46XXIaGZ/XO/moyHnUmsddYMKW5pjMr4AxeN8R45FxKZo2G7oYa1KwcO HvgFtH9oDQuArD060ng5N36w= X-Envelope-To: linux-kernel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 6471dc207b4861e7; Tue, 08 Sep 2026 02:22:04 +0000 X-Mizu-Trace-ID: 6471dc207b4861e7 X-Migadu-Flow: FLOW_OUT From: Tao Cui To: tj@kernel.org, josef@toxicopanda.com, axboe@kernel.dk Cc: cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, cui.tao@linux.dev, Tao Cui Subject: [PATCH 2/4] blk-iocost: charge zone appends as page-counted sequential writes Date: Tue, 8 Sep 2026 10:21:33 +0800 Message-ID: <20260908022135.1429281-3-cui.tao@linux.dev> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260908022135.1429281-1-cui.tao@linux.dev> References: <20260908022135.1429281-1-cui.tao@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Tao Cui Zone append is a primary write operation for zoned devices; zoned btrfs and f2fs use it for data writes. It is priced at zero, so the zone append portion of zoned workloads runs outside the controller: a 1%-weight cgroup issued 16000 appends at zero cost on a zoned null_blk. A zone append advances the zone write pointer and is therefore sequential from the device's perspective; the actual sector is only returned after completion, so the cursor-based seq/rand classification doesn't apply. Price it as a page-counted sequential write. After this patch, 16000 appends from the same cgroup are charged 533264 usec (33us per append). Also skip the cursor update for ZA bios: bi_sector is the zone start, not the actual write position (which is only returned after completion). Setting the cursor from ZA would misclassify subsequent READ/WRITE bios. Fixes: 7caa47151ab2 ("blkcg: implement blk-iocost") Signed-off-by: Tao Cui --- block/blk-iocost.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/block/blk-iocost.c b/block/blk-iocost.c index abc512532ed9..d7860ec1ad49 100644 --- a/block/blk-iocost.c +++ b/block/blk-iocost.c @@ -2557,6 +2557,17 @@ static void calc_vtime_cost_builtin(struct bio *bio,= struct ioc_gq *iocg, coef_randio =3D ioc->params.lcoefs[LCOEF_WRANDIO]; coef_page =3D ioc->params.lcoefs[LCOEF_WPAGE]; break; + case REQ_OP_ZONE_APPEND: + /* + * A zone append advances the zone write pointer and is + * therefore sequential from the device's perspective, so + * the cursor-based classification below doesn't apply. + * Compute the full cost here. + */ + if (!is_merge) + cost +=3D ioc->params.lcoefs[LCOEF_WSEQIO]; + cost +=3D pages * ioc->params.lcoefs[LCOEF_WPAGE]; + goto out; default: goto out; } @@ -2717,7 +2728,9 @@ static void ioc_rqos_throttle(struct rq_qos *rqos, st= ruct bio *bio) if (!iocg_activate(iocg, &now)) return; =20 - iocg->cursor =3D bio_end_sector(bio); + /* ZA bi_sector is zone start, not the write position */ + if (bio_op(bio) !=3D REQ_OP_ZONE_APPEND) + iocg->cursor =3D bio_end_sector(bio); vtime =3D atomic64_read(&iocg->vtime); cost =3D adjust_inuse_and_calc_cost(iocg, vtime, abs_cost, &now); =20 --=20 2.43.0 From nobody Fri Sep 25 22:18:48 2026 Received: from mta1.migadu.com (out-53.mta1.migadu.com [95.215.58.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 00B4E2BD587 for ; Tue, 8 Sep 2026 02:22:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788834135; cv=none; b=liyQHVrcuQrw27jDPnUpJ3GguYEvf6cOaJT/VrcXBl6G44TjXXZaIQvT5dQoiNqnroc8TR8Ketx0Ex7g3he5bdE9Y/fF5UCzUHg3stjlFEwuPQbMcvPG2HMsFaDultHCpct6/lEAoQXIkqCyu/oNwT5X8FWVcuIwDtj7XpK7zFM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788834135; c=relaxed/simple; bh=XrfCJ2yq4Pel9YDmeRVtPrl/rhKP6Bf09p5x0cJBln4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=s3x2hHMzSQgGWNNhQvyvgplPX47bO46SwuA6OveG4x+aDgt/cqes1fi/LLfEgPlrliRHtJm4yJpYdh9etO6eIDtLcyY74Be/tXkCWhx2g7XguyAWobh73qhV913I2FPOhF9MFb2KkYQ8iWQubmcJLadLakoHovufv3tYiTSzfNY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=rvFoY7Xj; arc=none smtp.client-ip=95.215.58.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="rvFoY7Xj" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=XrfCJ2yq4Pel9YDmeRVtPrl/rhKP6Bf09p5x0cJBln4=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1788834131; v=1; x=1789438931; b=rvFoY7XjjTX4cgUSRMNFB0hMFaDhvCOc8rgdEQdzBfxUyMwJc9AAm8Cot25J1iyfmU+m+sB5 G6QFYdrQUPZNZ899dO9MdHJssFo0G7+E5kE+z8apyfMQcQwnmFyDBG+BtW9GLC2A2IxNOETc5LK /9T1vqWOWmeyd/Z5XFz94PoA= X-Envelope-To: linux-kernel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 6af8ed773968ad58; Tue, 08 Sep 2026 02:22:11 +0000 X-Mizu-Trace-ID: 6af8ed773968ad58 X-Migadu-Flow: FLOW_OUT From: Tao Cui To: tj@kernel.org, josef@toxicopanda.com, axboe@kernel.dk Cc: cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, cui.tao@linux.dev, Tao Cui Subject: [PATCH 3/4] blk-iocost: account zone append completions in latency stats Date: Tue, 8 Sep 2026 10:21:34 +0800 Message-ID: <20260908022135.1429281-4-cui.tao@linux.dev> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260908022135.1429281-1-cui.tao@linux.dev> References: <20260908022135.1429281-1-cui.tao@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Tao Cui ioc_rqos_done() only accounts READ and WRITE completions, so zone append completions are excluded from the latency window: the vrate feedback loop cannot see ZA-induced latency, leaving it unable to respond to device saturation caused by zone appends. Similarly, calc_size_vtime_cost_builtin() does not classify zone append as a write operation. Charging (the cost model) and feedback (the latency window) are separate mechanisms, so this is not covered by the previous patch that prices zone appends. Treat zone append as WRITE for both latency accounting and cost classification. Fixes: 7caa47151ab2 ("blkcg: implement blk-iocost") Signed-off-by: Tao Cui --- block/blk-iocost.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/blk-iocost.c b/block/blk-iocost.c index d7860ec1ad49..1bf622e39ce4 100644 --- a/block/blk-iocost.c +++ b/block/blk-iocost.c @@ -2606,6 +2606,7 @@ static void calc_size_vtime_cost_builtin(struct reque= st *rq, struct ioc *ioc, case REQ_OP_READ: *costp =3D pages * ioc->params.lcoefs[LCOEF_RPAGE]; break; + case REQ_OP_ZONE_APPEND: case REQ_OP_WRITE: *costp =3D pages * ioc->params.lcoefs[LCOEF_WPAGE]; break; @@ -2876,6 +2877,7 @@ static void ioc_rqos_done(struct rq_qos *rqos, struct= request *rq) pidx =3D QOS_RLAT; rw =3D READ; break; + case REQ_OP_ZONE_APPEND: case REQ_OP_WRITE: pidx =3D QOS_WLAT; rw =3D WRITE; --=20 2.43.0 From nobody Fri Sep 25 22:18:48 2026 Received: from mta0.migadu.com (out-236.mta0.migadu.com [91.218.175.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A1003331EBA for ; Tue, 8 Sep 2026 02:22:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.236 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788834140; cv=none; b=si2Jf4GZH4JY5oWHVbzCOMABpZPj0vFbYOjanCXC7PKJ5HMqzZn/TdYFRd/DFuPW1Xq5WmYYSvTggvFoGzC2lMK6yen6JEq5PrjqueKRHOfZQkqkWMRjTCWwsw1gvmOQHmiDCalCF5QY48+jTjOkiJnQvIoQuhRfzTowE4n3YHk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788834140; c=relaxed/simple; bh=+7oq5uHuVPJK5uMrOqgMV+yf3ES7m8PcHA7y3Qbu4dE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dzlTZbjuufymhPB7ZPQPduyRtU9Xg8Gbuwl9AYZgvjFWfEsegrkbpIOeQcI074TsXuSCu3PpGPHvTZoTWB7FuWRmupM7+a3HhGiKIGaXOq97b1XyDCBYYS4+VCKhV2cqsY2Kn/igp1rXJtAy72FyFdng9kx1hJoyXxDid9y5KwA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=P/lqw/N7; arc=none smtp.client-ip=91.218.175.236 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="P/lqw/N7" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=+7oq5uHuVPJK5uMrOqgMV+yf3ES7m8PcHA7y3Qbu4dE=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1788834136; v=1; x=1789438936; b=P/lqw/N7j0aWooYPjS7rPW+wSoy5Vt9LfK8KFKwKaTvvZmYB0ES1WKc5Wodho95RP+MC4bvD f+wep+UfizPMF2G2zC7QRvrnyqiZX8NxtizoLhmmgHW6lPCn7HQzk2ZOWv4zYcCyfzr3jWozgDy nmqwqWswS7dta+XPphf5OLQE= X-Envelope-To: linux-kernel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id a39043acaf6914aa; Tue, 08 Sep 2026 02:22:16 +0000 X-Mizu-Trace-ID: a39043acaf6914aa X-Migadu-Flow: FLOW_OUT From: Tao Cui To: tj@kernel.org, josef@toxicopanda.com, axboe@kernel.dk Cc: cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, cui.tao@linux.dev, Tao Cui Subject: [PATCH 4/4] blk-iocost: fix stale comment in ioc_rqos_throttle() Date: Tue, 8 Sep 2026 10:21:35 +0800 Message-ID: <20260908022135.1429281-5-cui.tao@linux.dev> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260908022135.1429281-1-cui.tao@linux.dev> References: <20260908022135.1429281-1-cui.tao@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Tao Cui The comment says that priority-inversion IOs are "punted to @ioc->aux_iocg", but no aux_iocg field ever existed in struct ioc. The comment was introduced already stale by commit da437b95db83 ("blk-iocost: grab ioc->lock for debt handling"). Update it to describe the current use_debt / iocg->abs_vdebt mechanism. Signed-off-by: Tao Cui --- block/blk-iocost.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/block/blk-iocost.c b/block/blk-iocost.c index 1bf622e39ce4..f99c4f5c83fd 100644 --- a/block/blk-iocost.c +++ b/block/blk-iocost.c @@ -2748,10 +2748,11 @@ static void ioc_rqos_throttle(struct rq_qos *rqos, = struct bio *bio) =20 /* * We're over budget. This can be handled in two ways. IOs which may - * cause priority inversions are punted to @ioc->aux_iocg and charged as - * debt. Otherwise, the issuer is blocked on @iocg->waitq. Debt handling - * requires @ioc->lock, waitq handling @iocg->waitq.lock. Determine - * whether debt handling is needed and acquire locks accordingly. + * cause priority inversions are issued regardless and charged against + * @iocg->abs_vdebt as debt. Otherwise, the issuer is blocked on + * @iocg->waitq. Debt handling requires @ioc->lock, waitq handling + * @iocg->waitq.lock. Determine whether debt handling is needed and + * acquire locks accordingly. */ use_debt =3D bio_issue_as_root_blkg(bio) || fatal_signal_pending(current); ioc_locked =3D use_debt || READ_ONCE(iocg->abs_vdebt); --=20 2.43.0