public inbox for linux-doc@vger.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Uday Shankar <ushankar@purestorage.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	Caleb Sander Mateos <csander@purestorage.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Shuah Khan <shuah@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v7 6/8] selftests: ublk: kublk: decouple ublk_queues from ublk server threads
Date: Thu, 29 May 2025 17:47:22 +0800	[thread overview]
Message-ID: <aDgtKtFTi--IWpqB@fedora> (raw)
In-Reply-To: <20250527-ublk_task_per_io-v7-6-cbdbaf283baa@purestorage.com>

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@purestorage.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@redhat.com>


  reply	other threads:[~2025-05-29  9:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-27 23:01 [PATCH v7 0/8] ublk: decouple server threads from ublk_queues/hctxs Uday Shankar
2025-05-27 23:01 ` [PATCH v7 1/8] ublk: have a per-io daemon instead of a per-queue daemon Uday Shankar
2025-05-28 18:25   ` Caleb Sander Mateos
2025-05-29  9:59   ` Ming Lei
2025-05-29 15:37     ` Caleb Sander Mateos
2025-05-29 15:39   ` Caleb Sander Mateos
2025-05-27 23:01 ` [PATCH v7 2/8] selftests: ublk: kublk: plumb q_id in io_uring user_data Uday Shankar
2025-05-27 23:01 ` [PATCH v7 3/8] selftests: ublk: kublk: tie sqe allocation to io instead of queue Uday Shankar
2025-05-29  9:45   ` Ming Lei
2025-05-27 23:01 ` [PATCH v7 4/8] selftests: ublk: kublk: lift queue initialization out of thread Uday Shankar
2025-05-27 23:01 ` [PATCH v7 5/8] selftests: ublk: kublk: move per-thread data out of ublk_queue Uday Shankar
2025-05-27 23:01 ` [PATCH v7 6/8] selftests: ublk: kublk: decouple ublk_queues from ublk server threads Uday Shankar
2025-05-29  9:47   ` Ming Lei [this message]
2025-05-27 23:01 ` [PATCH v7 7/8] selftests: ublk: add test for per io daemons Uday Shankar
2025-05-29  9:47   ` Ming Lei
2025-05-27 23:01 ` [PATCH v7 8/8] Documentation: ublk: document UBLK_F_PER_IO_DAEMON Uday Shankar
2025-05-28 18:25   ` Caleb Sander Mateos
2025-05-29  9:48   ` Ming Lei

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=aDgtKtFTi--IWpqB@fedora \
    --to=ming.lei@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=corbet@lwn.net \
    --cc=csander@purestorage.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=ushankar@purestorage.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