[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8307c778-cdda-d6b0-9302-d466187e2399@huaweicloud.com>
Date: Wed, 3 Sep 2025 08:54:33 +0800
From: Yu Kuai <yukuai1@...weicloud.com>
To: Bart Van Assche <bvanassche@....org>, Yu Kuai <yukuai1@...weicloud.com>,
hch@...radead.org, colyli@...nel.org, hare@...e.de, dlemoal@...nel.org,
tieren@...as.com, axboe@...nel.dk, tj@...nel.org, josef@...icpanda.com,
song@...nel.org, kmo@...erainc.com, satyat@...gle.com, ebiggers@...gle.com,
neil@...wn.name, akpm@...ux-foundation.org
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
cgroups@...r.kernel.org, linux-raid@...r.kernel.org, yi.zhang@...wei.com,
yangerkun@...wei.com, johnny.chenyi@...wei.com,
"yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH RFC v3 02/15] block: add QUEUE_FLAG_BIO_ISSUE
Hi,
在 2025/09/03 1:05, Bart Van Assche 写道:
> On 8/31/25 8:32 PM, Yu Kuai wrote:
>> @@ -372,7 +372,10 @@ static inline void blkg_put(struct blkcg_gq *blkg)
>> static inline void blkcg_bio_issue_init(struct bio *bio)
>> {
>> - bio->issue_time_ns = blk_time_get_ns();
>> + struct request_queue *q = bdev_get_queue(bio->bi_bdev);
>> +
>> + if (test_bit(QUEUE_FLAG_BIO_ISSUE, &q->queue_flags))
>> + bio->issue_time_ns = blk_time_get_ns();
>> }
>> static inline void blkcg_use_delay(struct blkcg_gq *blkg)
>> diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c
>> index 554b191a6892..c9b3bd12c87c 100644
>> --- a/block/blk-iolatency.c
>> +++ b/block/blk-iolatency.c
>> @@ -767,6 +767,7 @@ static int blk_iolatency_init(struct gendisk *disk)
>> if (ret)
>> goto err_qos_del;
>> + blk_queue_flag_set(QUEUE_FLAG_BIO_ISSUE, disk->queue);
>> timer_setup(&blkiolat->timer, blkiolatency_timer_fn, 0);
>> INIT_WORK(&blkiolat->enable_work, blkiolatency_enable_work_fn);
>
> Shouldn't QUEUE_FLAG_BIO_ISSUE be cleared when initializing
> bio->issue_time_ns is no longer necessary?
>
iolatency can never be freed after it's initialized, however, I can add
and clear this flag in blkiolatency_enable_work_fn() instead, when
iolatency is really enabled or discabled.
Thanks,
Kuai
> Thanks,
>
> Bart.
>
> .
>
Powered by blists - more mailing lists