mbox series

[for-6.7/io_uring,0/7] ublk: simplify abort with cancelable uring_cmd

Message ID 20231009093324.957829-1-ming.lei@redhat.com (mailing list archive)
Headers show
Series ublk: simplify abort with cancelable uring_cmd | expand

Message

Ming Lei Oct. 9, 2023, 9:33 a.m. UTC
Hello,

Simplify ublk request & io command aborting handling with the new added
cancelable uring_cmd. With this change, the aborting logic becomes
simpler and more reliable, and it becomes easy to add new feature, such
as relaxing queue/ublk daemon association.

Pass `blktests ublk` test, and pass lockdep when running `./check ublk`
of blktests.


Ming Lei (7):
  ublk: don't get ublk device reference in ublk_abort_queue()
  ublk: make sure io cmd handled in submitter task context
  ublk: move ublk_cancel_dev() out of ub->mutex
  ublk: rename mm_lock as lock
  ublk: quiesce request queue when aborting queue
  ublk: replace monitor with cancelable uring_cmd
  ublk: simplify aborting request

 drivers/block/ublk_drv.c | 306 ++++++++++++++++++++++++---------------
 1 file changed, 190 insertions(+), 116 deletions(-)

Comments

Ming Lei Oct. 16, 2023, 11:47 p.m. UTC | #1
On Mon, Oct 09, 2023 at 05:33:15PM +0800, Ming Lei wrote:
> Hello,
> 
> Simplify ublk request & io command aborting handling with the new added
> cancelable uring_cmd. With this change, the aborting logic becomes
> simpler and more reliable, and it becomes easy to add new feature, such
> as relaxing queue/ublk daemon association.
> 
> Pass `blktests ublk` test, and pass lockdep when running `./check ublk`
> of blktests.

Hello Guys,

Ping...


Thanks,
Ming
Jens Axboe Oct. 17, 2023, 1:13 a.m. UTC | #2
On Mon, 09 Oct 2023 17:33:15 +0800, Ming Lei wrote:
> Simplify ublk request & io command aborting handling with the new added
> cancelable uring_cmd. With this change, the aborting logic becomes
> simpler and more reliable, and it becomes easy to add new feature, such
> as relaxing queue/ublk daemon association.
> 
> Pass `blktests ublk` test, and pass lockdep when running `./check ublk`
> of blktests.
> 
> [...]

Applied, thanks!

[1/7] ublk: don't get ublk device reference in ublk_abort_queue()
      commit: a5365f65ea2244fef4d6b5076210b0fc4fe5c104
[2/7] ublk: make sure io cmd handled in submitter task context
      commit: fad0f2b5c6d8f4622ed09ebfd6c08817abbfa20d
[3/7] ublk: move ublk_cancel_dev() out of ub->mutex
      commit: 95290eef462aaec33fb6f5f9da541042f9c9a97c
[4/7] ublk: rename mm_lock as lock
      commit: 9b8ce170c0bc82c50bf0db6187e00d3a601df334
[5/7] ublk: quiesce request queue when aborting queue
      commit: e4a81fcd73422bdee366c3a076826d92ee8f2669
[6/7] ublk: replace monitor with cancelable uring_cmd
      commit: 3aa8ac4a0c293fcc1b83c4f1a515b66f1f0123a0
[7/7] ublk: simplify aborting request
      commit: ac7eb8f9b49c786aace696bcca13a60953ea9b11

Best regards,
Jens Axboe Oct. 17, 2023, 1:14 a.m. UTC | #3
On 10/16/23 5:47 PM, Ming Lei wrote:
> On Mon, Oct 09, 2023 at 05:33:15PM +0800, Ming Lei wrote:
>> Hello,
>>
>> Simplify ublk request & io command aborting handling with the new added
>> cancelable uring_cmd. With this change, the aborting logic becomes
>> simpler and more reliable, and it becomes easy to add new feature, such
>> as relaxing queue/ublk daemon association.
>>
>> Pass `blktests ublk` test, and pass lockdep when running `./check ublk`
>> of blktests.
> 
> Hello Guys,
> 
> Ping...

I thought I had already queued this up... Done so now, thanks Ming.
Ming Lei Oct. 17, 2023, 5 a.m. UTC | #4
On Mon, Oct 16, 2023 at 07:13:53PM -0600, Jens Axboe wrote:
> 
> On Mon, 09 Oct 2023 17:33:15 +0800, Ming Lei wrote:
> > Simplify ublk request & io command aborting handling with the new added
> > cancelable uring_cmd. With this change, the aborting logic becomes
> > simpler and more reliable, and it becomes easy to add new feature, such
> > as relaxing queue/ublk daemon association.
> > 
> > Pass `blktests ublk` test, and pass lockdep when running `./check ublk`
> > of blktests.
> > 
> > [...]
> 
> Applied, thanks!
> 
> [1/7] ublk: don't get ublk device reference in ublk_abort_queue()
>       commit: a5365f65ea2244fef4d6b5076210b0fc4fe5c104
> [2/7] ublk: make sure io cmd handled in submitter task context
>       commit: fad0f2b5c6d8f4622ed09ebfd6c08817abbfa20d
> [3/7] ublk: move ublk_cancel_dev() out of ub->mutex
>       commit: 95290eef462aaec33fb6f5f9da541042f9c9a97c
> [4/7] ublk: rename mm_lock as lock
>       commit: 9b8ce170c0bc82c50bf0db6187e00d3a601df334
> [5/7] ublk: quiesce request queue when aborting queue
>       commit: e4a81fcd73422bdee366c3a076826d92ee8f2669
> [6/7] ublk: replace monitor with cancelable uring_cmd
>       commit: 3aa8ac4a0c293fcc1b83c4f1a515b66f1f0123a0
> [7/7] ublk: simplify aborting request
>       commit: ac7eb8f9b49c786aace696bcca13a60953ea9b11

Hi Jens,

Thanks for pulling this patchset it.

However, it depends on recent cancelable uring_cmd in for-6.7/io_uring,
but you pull it in for-6.7/block, which is broken now.

Thanks,
Ming
Jens Axboe Oct. 17, 2023, 2:24 p.m. UTC | #5
On 10/16/23 11:00 PM, Ming Lei wrote:
> On Mon, Oct 16, 2023 at 07:13:53PM -0600, Jens Axboe wrote:
>>
>> On Mon, 09 Oct 2023 17:33:15 +0800, Ming Lei wrote:
>>> Simplify ublk request & io command aborting handling with the new added
>>> cancelable uring_cmd. With this change, the aborting logic becomes
>>> simpler and more reliable, and it becomes easy to add new feature, such
>>> as relaxing queue/ublk daemon association.
>>>
>>> Pass `blktests ublk` test, and pass lockdep when running `./check ublk`
>>> of blktests.
>>>
>>> [...]
>>
>> Applied, thanks!
>>
>> [1/7] ublk: don't get ublk device reference in ublk_abort_queue()
>>       commit: a5365f65ea2244fef4d6b5076210b0fc4fe5c104
>> [2/7] ublk: make sure io cmd handled in submitter task context
>>       commit: fad0f2b5c6d8f4622ed09ebfd6c08817abbfa20d
>> [3/7] ublk: move ublk_cancel_dev() out of ub->mutex
>>       commit: 95290eef462aaec33fb6f5f9da541042f9c9a97c
>> [4/7] ublk: rename mm_lock as lock
>>       commit: 9b8ce170c0bc82c50bf0db6187e00d3a601df334
>> [5/7] ublk: quiesce request queue when aborting queue
>>       commit: e4a81fcd73422bdee366c3a076826d92ee8f2669
>> [6/7] ublk: replace monitor with cancelable uring_cmd
>>       commit: 3aa8ac4a0c293fcc1b83c4f1a515b66f1f0123a0
>> [7/7] ublk: simplify aborting request
>>       commit: ac7eb8f9b49c786aace696bcca13a60953ea9b11
> 
> Hi Jens,
> 
> Thanks for pulling this patchset it.
> 
> However, it depends on recent cancelable uring_cmd in for-6.7/io_uring,
> but you pull it in for-6.7/block, which is broken now.

Ah indeed, and this is probably why it didn't get added initially. I'll
sort it out.