[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aDgtKtFTi--IWpqB@fedora>
Date: Thu, 29 May 2025 17:47:22 +0800
From: Ming Lei <ming.lei@...hat.com>
To: Uday Shankar <ushankar@...estorage.com>
Cc: Jens Axboe <axboe@...nel.dk>,
Caleb Sander Mateos <csander@...estorage.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Shuah Khan <shuah@...nel.org>, Jonathan Corbet <corbet@....net>,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org, linux-doc@...r.kernel.org
Subject: Re: [PATCH v7 6/8] selftests: ublk: kublk: decouple ublk_queues from
ublk server threads
On Tue, May 27, 2025 at 05:01:29PM -0600, Uday Shankar wrote:
> Add support in kublk for decoupled ublk_queues and ublk server threads.
> kublk now has two modes of operation:
>
> - (preexisting mode) threads and queues are paired 1:1, and each thread
> services all the I/Os of one queue
> - (new mode) thread and queue counts are independently configurable.
> threads service I/Os in a way that balances load across threads even
> if load is not balanced over queues.
>
> The default is the preexisting mode. The new mode is activated by
> passing the --per_io_tasks flag.
>
> Signed-off-by: Uday Shankar <ushankar@...estorage.com>
> ---
...
> diff --git a/tools/testing/selftests/ublk/kublk.h b/tools/testing/selftests/ublk/kublk.h
> index 3a2ae095bee18633acd5a9c923cfab2d14fe3bff..4cc8103bc49a7a93bbf61986cde8f4e6e1be716d 100644
> --- a/tools/testing/selftests/ublk/kublk.h
> +++ b/tools/testing/selftests/ublk/kublk.h
> @@ -80,6 +80,7 @@ struct dev_ctx {
> char tgt_type[16];
> unsigned long flags;
> unsigned nr_hw_queues;
> + unsigned nthreads;
> unsigned queue_depth;
> int dev_id;
> int nr_files;
> @@ -89,6 +90,7 @@ struct dev_ctx {
> unsigned int fg:1;
> unsigned int recovery:1;
> unsigned int auto_zc_fallback:1;
> + unsigned int per_io_tasks:1;
>
> int _evtfd;
> int _shmid;
> @@ -128,6 +130,7 @@ struct ublk_io {
> unsigned short refs; /* used by target code only */
>
> int tag;
> + int buf_index;
Both the above two can be 'unsigned short', otherwise:
Reviewed-by: Ming Lei <ming.lei@...hat.com>
Powered by blists - more mailing lists