All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Aishwarya <aishwarya.tcv@arm.com>, wozizhi@huaweicloud.com
Cc: linux-block@vger.kernel.org, ming.lei@redhat.com, tj@kernel.org,
	yangerkun@huawei.com, yukuai3@huawei.com, ryan.roberts@arm.com
Subject: Re: [PATCH V5 6/7] blk-throttle: Split the service queue
Date: Thu, 15 May 2025 07:39:12 -0600	[thread overview]
Message-ID: <0d059764-76ba-4681-8cc1-4783424ad3bf@kernel.dk> (raw)
In-Reply-To: <20250515130830.9671-1-aishwarya.tcv@arm.com>

On 5/15/25 7:08 AM, Aishwarya wrote:
> Observed the following build warning when building the next-20250515 kernel with defconfig+CONFIG_BLK_DEV_THROTTLING applied:
> 
> Warning output:
> 
> ../block/blk-throttle.c: In function 'throtl_pending_timer_fn':
> ../block/blk-throttle.c:1153:30: warning: unused variable 'bio_cnt_w' [-Wunused-variable]
>  1153 |                 unsigned int bio_cnt_w = sq_queued(sq, WRITE);
>       |                              ^~~~~~~~~
> ../block/blk-throttle.c:1152:30: warning: unused variable 'bio_cnt_r' [-Wunused-variable]
>  1152 |                 unsigned int bio_cnt_r = sq_queued(sq, READ);
>       |                              ^~~~~~~~~
> 
> 
> There?s no warning with defconfig alone, and I?ve confirmed that the warning appears when CONFIG_BLK_DEV_THROTTLING is explicitly enabled.

This should fix it. The issue is if blktrace isn't enabled.

diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index bf4faac83662..bd15357f23bd 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -1149,8 +1149,8 @@ static void throtl_pending_timer_fn(struct timer_list *t)
 	dispatched = false;
 
 	while (true) {
-		unsigned int bio_cnt_r = sq_queued(sq, READ);
-		unsigned int bio_cnt_w = sq_queued(sq, WRITE);
+		unsigned int __maybe_unused bio_cnt_r = sq_queued(sq, READ);
+		unsigned int __maybe_unused bio_cnt_w = sq_queued(sq, WRITE);
 
 		throtl_log(sq, "dispatch nr_queued=%u read=%u write=%u",
 			   bio_cnt_r + bio_cnt_w, bio_cnt_r, bio_cnt_w);

-- 
Jens Axboe

  reply	other threads:[~2025-05-15 13:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-06  2:09 [PATCH V5 0/7] blk-throttle: Split the blkthrotl queue to solve the IO delay issue Zizhi Wo
2025-05-06  2:09 ` [PATCH V5 1/7] blk-throttle: Rename tg_may_dispatch() to tg_dispatch_time() Zizhi Wo
2025-05-06  2:09 ` [PATCH V5 2/7] blk-throttle: Refactor tg_dispatch_time by extracting tg_dispatch_bps/iops_time Zizhi Wo
2025-05-06  2:09 ` [PATCH V5 3/7] blk-throttle: Split throtl_charge_bio() into bps and iops functions Zizhi Wo
2025-05-06  2:09 ` [PATCH V5 4/7] blk-throttle: Introduce flag "BIO_TG_BPS_THROTTLED" Zizhi Wo
2025-05-06  2:09 ` [PATCH V5 5/7] blk-throttle: Split the blkthrotl queue Zizhi Wo
2025-05-06  2:09 ` [PATCH V5 6/7] blk-throttle: Split the service queue Zizhi Wo
2025-05-15 13:08   ` Aishwarya
2025-05-15 13:39     ` Jens Axboe [this message]
2025-05-15 13:47       ` Zizhi Wo
2025-05-15 13:49         ` Jens Axboe
2025-05-06  2:09 ` [PATCH V5 7/7] blk-throttle: Prevents the bps restricted io from entering the bps queue again Zizhi Wo
2025-05-12  1:20 ` [PATCH V5 0/7] blk-throttle: Split the blkthrotl queue to solve the IO delay issue Zizhi Wo
2025-05-13 20:47 ` Jens Axboe

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=0d059764-76ba-4681-8cc1-4783424ad3bf@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=aishwarya.tcv@arm.com \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=ryan.roberts@arm.com \
    --cc=tj@kernel.org \
    --cc=wozizhi@huaweicloud.com \
    --cc=yangerkun@huawei.com \
    --cc=yukuai3@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.