mbox series

[0/6] ZNS: Extra features for current patches

Message ID 20200625122152.17359-1-javier@javigon.com (mailing list archive)
Headers show
Series ZNS: Extra features for current patches | expand

Message

Javier González June 25, 2020, 12:21 p.m. UTC
From: Javier González <javier.gonz@samsung.com>

This patchset extends zoned device functionality on top of the existing
v3 ZNS patchset that Keith sent last week.

Patches 1-5 are zoned block interface and IOCTL additions to expose ZNS
values to user-space. One major change is the addition of a new zone
management IOCTL that allows to extend zone management commands with
flags. I recall a conversation in the mailing list from early this year
where a similar approach was proposed by Matias, but never made it
upstream. We extended the IOCTL here to align with the comments in that
thread. Here, we are happy to get sign-offs by anyone that contributed
to the thread - just comment here or on the patch.

Patch 6 is nvme-only and adds an extra check to the ZNS report code to
ensure consistency on the zone count.

The patches apply on top of Jens' block-5.8 + Keith's V3 ZNS patches.

Thanks,
Javier

Javier González (6):
  block: introduce IOCTL for zone mgmt
  block: add support for selecting all zones
  block: add support for zone offline transition
  block: introduce IOCTL to report dev properties
  block: add zone attr. to zone mgmt IOCTL struct
  nvme: Add consistency check for zone count

 block/blk-core.c              |   2 +
 block/blk-zoned.c             | 108 +++++++++++++++++++++++++++++++++-
 block/ioctl.c                 |   4 ++
 drivers/nvme/host/core.c      |   5 ++
 drivers/nvme/host/nvme.h      |  11 ++++
 drivers/nvme/host/zns.c       |  69 ++++++++++++++++++++++
 include/linux/blk_types.h     |   6 +-
 include/linux/blkdev.h        |  19 +++++-
 include/uapi/linux/blkzoned.h |  69 +++++++++++++++++++++-
 9 files changed, 289 insertions(+), 4 deletions(-)

Comments

Matias Bjorling June 25, 2020, 1:04 p.m. UTC | #1
On 25/06/2020 14.21, Javier González wrote:
> From: Javier González <javier.gonz@samsung.com>
>
> This patchset extends zoned device functionality on top of the existing
> v3 ZNS patchset that Keith sent last week.
>
> Patches 1-5 are zoned block interface and IOCTL additions to expose ZNS
> values to user-space. One major change is the addition of a new zone
> management IOCTL that allows to extend zone management commands with
> flags. I recall a conversation in the mailing list from early this year
> where a similar approach was proposed by Matias, but never made it
> upstream. We extended the IOCTL here to align with the comments in that
> thread. Here, we are happy to get sign-offs by anyone that contributed
> to the thread - just comment here or on the patch.

The original patchset is available here: https://lkml.org/lkml/2019/6/21/419

We wanted to wait posting our updated patches until the base patches 
were upstream. I guess the cat is out of the bag. :)

For the open/finish/reset patch, you'll want to take a look at the 
original patchset, and apply the feedback from that thread to your 
patch. Please also consider the users of these operations, e.g., dm, 
scsi, null_blk, etc. The original patchset has patches for that.





>
> Patch 6 is nvme-only and adds an extra check to the ZNS report code to
> ensure consistency on the zone count.
>
> The patches apply on top of Jens' block-5.8 + Keith's V3 ZNS patches.
>
> Thanks,
> Javier
>
> Javier González (6):
>    block: introduce IOCTL for zone mgmt
>    block: add support for selecting all zones
>    block: add support for zone offline transition
>    block: introduce IOCTL to report dev properties
>    block: add zone attr. to zone mgmt IOCTL struct
>    nvme: Add consistency check for zone count
>
>   block/blk-core.c              |   2 +
>   block/blk-zoned.c             | 108 +++++++++++++++++++++++++++++++++-
>   block/ioctl.c                 |   4 ++
>   drivers/nvme/host/core.c      |   5 ++
>   drivers/nvme/host/nvme.h      |  11 ++++
>   drivers/nvme/host/zns.c       |  69 ++++++++++++++++++++++
>   include/linux/blk_types.h     |   6 +-
>   include/linux/blkdev.h        |  19 +++++-
>   include/uapi/linux/blkzoned.h |  69 +++++++++++++++++++++-
>   9 files changed, 289 insertions(+), 4 deletions(-)
>
Matias Bjorling June 25, 2020, 2:48 p.m. UTC | #2
On 25/06/2020 15.04, Matias Bjørling wrote:
> On 25/06/2020 14.21, Javier González wrote:
>> From: Javier González <javier.gonz@samsung.com>
>>
>> This patchset extends zoned device functionality on top of the existing
>> v3 ZNS patchset that Keith sent last week.
>>
>> Patches 1-5 are zoned block interface and IOCTL additions to expose ZNS
>> values to user-space. One major change is the addition of a new zone
>> management IOCTL that allows to extend zone management commands with
>> flags. I recall a conversation in the mailing list from early this year
>> where a similar approach was proposed by Matias, but never made it
>> upstream. We extended the IOCTL here to align with the comments in that
>> thread. Here, we are happy to get sign-offs by anyone that contributed
>> to the thread - just comment here or on the patch.
>
> The original patchset is available here: 
> https://lkml.org/lkml/2019/6/21/419
>
> We wanted to wait posting our updated patches until the base patches 
> were upstream. I guess the cat is out of the bag. :)
>
> For the open/finish/reset patch, you'll want to take a look at the 
> original patchset, and apply the feedback from that thread to your 
> patch. Please also consider the users of these operations, e.g., dm, 
> scsi, null_blk, etc. The original patchset has patches for that.
>
Please disregard the above - I forgot that the original patchset 
actually went upstream.

You're right that we discussed (I at least discussed it internally with 
Damien, but I can't find the mail) having one mgmt issuing the commands. 
We didn't go ahead and added it at that point due to ZNS still being in 
a fluffy state.
Javier González June 25, 2020, 7:39 p.m. UTC | #3
On 25.06.2020 16:48, Matias Bjørling wrote:
>On 25/06/2020 15.04, Matias Bjørling wrote:
>>On 25/06/2020 14.21, Javier González wrote:
>>>From: Javier González <javier.gonz@samsung.com>
>>>
>>>This patchset extends zoned device functionality on top of the existing
>>>v3 ZNS patchset that Keith sent last week.
>>>
>>>Patches 1-5 are zoned block interface and IOCTL additions to expose ZNS
>>>values to user-space. One major change is the addition of a new zone
>>>management IOCTL that allows to extend zone management commands with
>>>flags. I recall a conversation in the mailing list from early this year
>>>where a similar approach was proposed by Matias, but never made it
>>>upstream. We extended the IOCTL here to align with the comments in that
>>>thread. Here, we are happy to get sign-offs by anyone that contributed
>>>to the thread - just comment here or on the patch.
>>
>>The original patchset is available here: 
>>https://lkml.org/lkml/2019/6/21/419
>>
>>We wanted to wait posting our updated patches until the base patches 
>>were upstream. I guess the cat is out of the bag. :)
>>
>>For the open/finish/reset patch, you'll want to take a look at the 
>>original patchset, and apply the feedback from that thread to your 
>>patch. Please also consider the users of these operations, e.g., dm, 
>>scsi, null_blk, etc. The original patchset has patches for that.
>>
>Please disregard the above - I forgot that the original patchset 
>actually went upstream.
>
>You're right that we discussed (I at least discussed it internally 
>with Damien, but I can't find the mail) having one mgmt issuing the 
>commands. We didn't go ahead and added it at that point due to ZNS 
>still being in a fluffy state.
>

Does the proposed IOCTL align with the use cases you have in mind? I'm
happy to take it in a different series if you want to add patches to it
for other drivers (scsi, null_blk, etc.).
Matias Bjorling June 25, 2020, 7:53 p.m. UTC | #4
On 25/06/2020 21.39, Javier González wrote:
> On 25.06.2020 16:48, Matias Bjørling wrote:
>> On 25/06/2020 15.04, Matias Bjørling wrote:
>>> On 25/06/2020 14.21, Javier González wrote:
>>>> From: Javier González <javier.gonz@samsung.com>
>>>>
>>>> This patchset extends zoned device functionality on top of the 
>>>> existing
>>>> v3 ZNS patchset that Keith sent last week.
>>>>
>>>> Patches 1-5 are zoned block interface and IOCTL additions to expose 
>>>> ZNS
>>>> values to user-space. One major change is the addition of a new zone
>>>> management IOCTL that allows to extend zone management commands with
>>>> flags. I recall a conversation in the mailing list from early this 
>>>> year
>>>> where a similar approach was proposed by Matias, but never made it
>>>> upstream. We extended the IOCTL here to align with the comments in 
>>>> that
>>>> thread. Here, we are happy to get sign-offs by anyone that contributed
>>>> to the thread - just comment here or on the patch.
>>>
>>> The original patchset is available here: 
>>> https://lkml.org/lkml/2019/6/21/419
>>>
>>> We wanted to wait posting our updated patches until the base patches 
>>> were upstream. I guess the cat is out of the bag. :)
>>>
>>> For the open/finish/reset patch, you'll want to take a look at the 
>>> original patchset, and apply the feedback from that thread to your 
>>> patch. Please also consider the users of these operations, e.g., dm, 
>>> scsi, null_blk, etc. The original patchset has patches for that.
>>>
>> Please disregard the above - I forgot that the original patchset 
>> actually went upstream.
>>
>> You're right that we discussed (I at least discussed it internally 
>> with Damien, but I can't find the mail) having one mgmt issuing the 
>> commands. We didn't go ahead and added it at that point due to ZNS 
>> still being in a fluffy state.
>>
>
> Does the proposed IOCTL align with the use cases you have in mind? I'm
> happy to take it in a different series if you want to add patches to it
> for other drivers (scsi, null_blk, etc.).

I think the ioctl makes sense. I wanted to have it like that originally. 
I'm still thinking through if it covers the short-term cases for the 
upcoming TPs.
Javier González June 26, 2020, 6:26 a.m. UTC | #5
On 25.06.2020 21:53, Matias Bjørling wrote:
>On 25/06/2020 21.39, Javier González wrote:
>>On 25.06.2020 16:48, Matias Bjørling wrote:
>>>On 25/06/2020 15.04, Matias Bjørling wrote:
>>>>On 25/06/2020 14.21, Javier González wrote:
>>>>>From: Javier González <javier.gonz@samsung.com>
>>>>>
>>>>>This patchset extends zoned device functionality on top of the 
>>>>>existing
>>>>>v3 ZNS patchset that Keith sent last week.
>>>>>
>>>>>Patches 1-5 are zoned block interface and IOCTL additions to 
>>>>>expose ZNS
>>>>>values to user-space. One major change is the addition of a new zone
>>>>>management IOCTL that allows to extend zone management commands with
>>>>>flags. I recall a conversation in the mailing list from early 
>>>>>this year
>>>>>where a similar approach was proposed by Matias, but never made it
>>>>>upstream. We extended the IOCTL here to align with the 
>>>>>comments in that
>>>>>thread. Here, we are happy to get sign-offs by anyone that contributed
>>>>>to the thread - just comment here or on the patch.
>>>>
>>>>The original patchset is available here: 
>>>>https://lkml.org/lkml/2019/6/21/419
>>>>
>>>>We wanted to wait posting our updated patches until the base 
>>>>patches were upstream. I guess the cat is out of the bag. :)
>>>>
>>>>For the open/finish/reset patch, you'll want to take a look at 
>>>>the original patchset, and apply the feedback from that thread 
>>>>to your patch. Please also consider the users of these 
>>>>operations, e.g., dm, scsi, null_blk, etc. The original patchset 
>>>>has patches for that.
>>>>
>>>Please disregard the above - I forgot that the original patchset 
>>>actually went upstream.
>>>
>>>You're right that we discussed (I at least discussed it internally 
>>>with Damien, but I can't find the mail) having one mgmt issuing 
>>>the commands. We didn't go ahead and added it at that point due to 
>>>ZNS still being in a fluffy state.
>>>
>>
>>Does the proposed IOCTL align with the use cases you have in mind? I'm
>>happy to take it in a different series if you want to add patches to it
>>for other drivers (scsi, null_blk, etc.).
>
>I think the ioctl makes sense. I wanted to have it like that 
>originally. I'm still thinking through if it covers the short-term 
>cases for the upcoming TPs.

Yes. You can see that some of this is intended to support at least one
of the TPs that are in the TWG. It is also suitable for a couple TPs we
are working on internally and expect to bring to the group.

But please, do make sure it covers TPs that you know will be shared in
the TWG.

Javier