lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aJgAP_7eB1HppEpq@fedora>
Date: Sun, 10 Aug 2025 10:13:19 +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>,
	linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ublk: don't quiesce in ublk_ch_release

On Fri, Aug 08, 2025 at 03:44:43PM -0600, Uday Shankar wrote:
> ublk_ch_release currently quiesces the device's request_queue while
> setting force_abort/fail_io.  This avoids data races by preventing
> concurrent reads from the I/O path, but is not strictly needed - at this
> point, canceling is already set and guaranteed to be observed by any
> concurrently executing I/Os, so they will be handled properly even if
> the changes to force_abort/fail_io propagate to the I/O path later.
> Remove the quiesce/unquiesce calls from ublk_ch_release. This makes the
> writes to force_abort/fail_io concurrent with the reads in the I/O path,
> so make the accesses atomic.
> 
> Before this change, the call to blk_mq_quiesce_queue was responsible for
> most (90%) of the runtime of ublk_ch_release. With that call eliminated,
> ublk_ch_release runs much faster. Here is a comparison of the total time
> spent in calls to ublk_ch_release when a server handling 128 devices
> exits, before and after this change:
> 
> before: 1.11s
> after: 0.09s
> 
> Signed-off-by: Uday Shankar <ushankar@...estorage.com>

As commented, ->canceling is already set and observed in ublk io fast path,
this patch looks fine:

Reviewed-by: Ming Lei <ming.lei@...hat.com>


Thanks,
Ming


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ