[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2e54f27a-ae4c-af65-34ba-18b43bd4815d@acm.org>
Date: Tue, 13 Apr 2021 09:18:00 -0700
From: Bart Van Assche <bvanassche@....org>
To: Changheun Lee <nanich.lee@...sung.com>, damien.lemoal@....com,
Johannes.Thumshirn@....com, asml.silence@...il.com,
axboe@...nel.dk, gregkh@...uxfoundation.org, hch@...radead.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
ming.lei@...hat.com, osandov@...com, patchwork-bot@...nel.org,
tj@...nel.org, tom.leiming@...il.com
Cc: jisoo2146.oh@...sung.com, junho89.kim@...sung.com,
mj0123.lee@...sung.com, seunghwan.hyun@...sung.com,
sookwan7.kim@...sung.com, woosung2.lee@...sung.com,
yt0928.kim@...sung.com
Subject: Re: [PATCH v7 1/3] bio: limit bio max size
On 4/12/21 7:55 PM, Changheun Lee wrote:
> +unsigned int bio_max_size(struct bio *bio)
> +{
> + struct request_queue *q = bio->bi_bdev->bd_disk->queue;
> +
> + if (blk_queue_limit_bio_size(q))
> + return blk_queue_get_max_sectors(q, bio_op(bio))
> + << SECTOR_SHIFT;
> +
> + return UINT_MAX;
> +}
This patch adds an if-statement to the hot path and that may have a
slight negative performance impact. I recommend to follow the approach
of max_hw_sectors. That means removing QUEUE_FLAG_LIMIT_BIO_SIZE and to
initialize the maximum bio size to UINT_MAX in blk_set_default_limits().
Thanks,
Bart.
Powered by blists - more mailing lists