[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aU34F9Y-47IhFWRJ@fedora>
Date: Fri, 26 Dec 2025 10:51:03 +0800
From: Ming Lei <ming.lei@...hat.com>
To: Caleb Sander Mateos <csander@...estorage.com>
Cc: Jens Axboe <axboe@...nel.dk>, Shuah Khan <shuah@...nel.org>,
linux-block@...r.kernel.org, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org,
Stanley Zhang <stazhang@...estorage.com>,
Uday Shankar <ushankar@...estorage.com>
Subject: Re: [PATCH 13/20] ublk: optimize ublk_user_copy() on daemon task
On Tue, Dec 16, 2025 at 10:34:47PM -0700, Caleb Sander Mateos wrote:
> ublk user copy syscalls may be issued from any task, so they take a
> reference count on the struct ublk_io to check whether it is owned by
> the ublk server and prevent a concurrent UBLK_IO_COMMIT_AND_FETCH_REQ
> from completing the request. However, if the user copy syscall is issued
> on the io's daemon task, a concurrent UBLK_IO_COMMIT_AND_FETCH_REQ isn't
> possible, so the atomic reference count dance is unnecessary. Check for
> UBLK_IO_FLAG_OWNED_BY_SRV to ensure the request is dispatched to the
> sever and obtain the request from ublk_io's req field instead of looking
> it up on the tagset. Skip the reference count increment and decrement.
> Commit 8a8fe42d765b ("ublk: optimize UBLK_IO_REGISTER_IO_BUF on daemon
> task") made an analogous optimization for ublk zero copy buffer
> registration.
>
> Signed-off-by: Caleb Sander Mateos <csander@...estorage.com>
Reviewed-by: Ming Lei <ming.lei@...hat.com>
Thanks,
Ming
Powered by blists - more mailing lists