mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Yu Kuai <yukuai1@huaweicloud.com>,
	axboe@kernel.dk, akpm@linux-foundation.org, ming.lei@redhat.com,
	yang.yang@vivo.com, osandov@fb.com, paolo.valente@linaro.org
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	yukuai3@huawei.com, yi.zhang@huawei.com, yangerkun@huawei.com
Subject: Re: [PATCH v2 3/4] block/elevator: choose none elevator for high IO concurrency ability disk
Date: Tue, 17 Dec 2024 13:50:39 -0800	[thread overview]
Message-ID: <ac5aa72f-9944-4436-bed3-43e4e4e97f5e@acm.org> (raw)
In-Reply-To: <20241217024047.1091893-4-yukuai1@huaweicloud.com>

On 12/16/24 6:40 PM, Yu Kuai wrote:
> From: Yu Kuai <yukuai3@huawei.com>
> 
> The maximal default nr_requests is 256, and if disk can handle more than
> 256 requests concurrently, use elevator in this case is useless, on the
> one hand it limits the number of requests to 256, on the other hand,
> it can't merge or sort IO because requests are dispatched to disk
> immediately and the elevator is just empty.
> 
> For example, for nvme megaraid with 512 queue_depth by default, we have
> to change default elevator to none, otherwise deadline will lose a lot of
> performance.
> 
> Signed-off-by: Yu Kuai <yukuai3@huawei.com>
> ---
>   block/elevator.c | 11 +++++++++++
>   1 file changed, 11 insertions(+)
> 
> diff --git a/block/elevator.c b/block/elevator.c
> index 7c3ba80e5ff4..4cce1e7c47d5 100644
> --- a/block/elevator.c
> +++ b/block/elevator.c
> @@ -568,6 +568,17 @@ static struct elevator_type *elevator_get_default(struct request_queue *q)
>   	    !blk_mq_is_shared_tags(q->tag_set->flags))
>   		return NULL;
>   
> +	/*
> +	 * If nr_queues will be less than disk ability, requests will be
> +	 * dispatched to disk immediately, it's useless to use elevator. User
> +	 * should set a bigger nr_requests or limit disk ability manually if
> +	 * they really want to use elevator.
> +	 */
> +	if (q->queue_depth && q->queue_depth >= BLKDEV_DEFAULT_RQ * 2)
> +		return NULL;
> +	if (!q->queue_depth && q->tag_set->queue_depth >= BLKDEV_DEFAULT_RQ * 2)
> +		return NULL;
> +
>   	return elevator_find_get("mq-deadline");
>   }

Shouldn't this patch be submitted separately since it is independent of
the rest of the patches in this series?

Thanks,

Bart.



  reply	other threads:[~2024-12-17 21:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-17  2:40 [PATCH RFC v2 0/4] lib/sbitmap: fix shallow_depth tag allocation Yu Kuai
2024-12-17  2:40 ` [PATCH RFC v2 1/4] block/mq-deadline: Revert "block/mq-deadline: Fix the tag reservation code" Yu Kuai
2024-12-17 21:39   ` Bart Van Assche
2024-12-18  1:16     ` Yu Kuai
2024-12-17  2:40 ` [PATCH v2 RFC 2/4] lib/sbitmap: fix shallow_depth tag allocation Yu Kuai
2024-12-17 21:47   ` Bart Van Assche
2024-12-18  1:18     ` Yu Kuai
2024-12-17  2:40 ` [PATCH v2 3/4] block/elevator: choose none elevator for high IO concurrency ability disk Yu Kuai
2024-12-17 21:50   ` Bart Van Assche [this message]
2024-12-18  1:28     ` Yu Kuai
2024-12-17  2:40 ` [PATCH RFC v2 4/4] block/mq-deadline: introduce min_async_depth Yu Kuai
2024-12-17 22:13   ` Bart Van Assche
2024-12-18  1:12     ` Yu Kuai
2024-12-18  1:14       ` Yu Kuai
2024-12-18 18:00         ` Bart Van Assche
2024-12-19  1:21           ` Yu Kuai
2024-12-19 19:25             ` Bart Van Assche
2024-12-20  6:08               ` Yu Kuai
2024-12-18 18:06       ` Bart Van Assche
2024-12-19  1:54         ` Yu Kuai

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=ac5aa72f-9944-4436-bed3-43e4e4e97f5e@acm.org \
    --to=bvanassche@acm.org \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=osandov@fb.com \
    --cc=paolo.valente@linaro.org \
    --cc=yang.yang@vivo.com \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai1@huaweicloud.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®