cxl: Fix background operation handling
A message that is not in the archive (sent off-list or not yet received): CGME20230922130253epcas2p3112ca71e8a1dcf42967543063322df1e@epcas2p3.samsung.com
cover cxl: Fix background operation handling
Hello,
We are currently trying to add background commands like fw-related and sanitize operation. However, as we modified the code, we found that there was a lot of duplication of code, so we would like to modify the existing background command handling a little bit. We want to make the most of the existing background command handling so that we can easily add other background commands in the future.
The first patch modifies the existing sanitize operation handling to allow other background commands to be used with it, and the second patch modifies sanitize to work with the modified code. Finally, the third patch adds a sysfs file related to the background operation. This sysfs entry is select/poll capable from userspace to notify upon completion of a background operation.
Thanks,
/jtpark
Jeongtae Park (3):
cxl: Modify background cmd handling for the others cxl/mbox: Update sanitize opcode support cxl/memdev: Add background command sysfs file
Documentation/ABI/testing/sysfs-bus-cxl | 10 ++++ drivers/cxl/core/mbox.c | 5 +- drivers/cxl/core/memdev.c | 71 +++++++++++++++++++++++-- drivers/cxl/cxlmem.h | 33 ++++++++++-- drivers/cxl/pci.c | 65 +++++++++++----------- 5 files changed, 141 insertions(+), 43 deletions(-)
base-commit: fe77cc2e5a6a7c85f5c6ef8a39d7694ffc7f41c9
Signature · 1 line
2.34.1
Quoted 18 lines · Jeongtae Park
Hello,
We are currently trying to add background commands like fw-related and sanitize operation. However, as we modified the code, we found that there was a lot of duplication of code, so we would like to modify the existing background command handling a little bit. We want to make the most of the existing background command handling so that we can easily add other background commands in the future.
The first patch modifies the existing sanitize operation handling to allow other background commands to be used with it, and the second patch modifies sanitize to work with the modified code. Finally, the third patch adds a sysfs file related to the background operation. This sysfs entry is select/poll capable from userspace to notify upon completion of a background operation.
Quoted 2 lines
Thanks,
/jtpark
Hi Jeongtae,
For the next version of the series you send out, can you please make sure the series is threaded? Currently all your series are coming as individual mails. Thanks!
Quoted 15 lines
Jeongtae Park (3):
cxl: Modify background cmd handling for the others cxl/mbox: Update sanitize opcode support cxl/memdev: Add background command sysfs fileDocumentation/ABI/testing/sysfs-bus-cxl | 10 ++++ drivers/cxl/core/mbox.c | 5 +- drivers/cxl/core/memdev.c | 71 +++++++++++++++++++++++-- drivers/cxl/cxlmem.h | 33 ++++++++++-- drivers/cxl/pci.c | 65 +++++++++++----------- 5 files changed, 141 insertions(+), 43 deletions(-)base-commit:
fe77cc2e5a6a7c85f5c6ef8a39d7694ffc7f41c9
Quoted 21 lines · Dave Jiang
Quoted 18 lines · Jeongtae Park
Hello,
We are currently trying to add background commands like fw-related and sanitize operation. However, as we modified the code, we found that there was a lot of duplication of code, so we would like to modify the existing background command handling a little bit. We want to make the most of the existing background command handling so that we can easily add other background commands in the future.
The first patch modifies the existing sanitize operation handling to allow other background commands to be used with it, and the second patch modifies sanitize to work with the modified code. Finally, the third patch adds a sysfs file related to the background operation. This sysfs entry is select/poll capable from userspace to notify upon completion of a background operation.
Quoted 5 lines
Quoted 2 lines
Thanks,
/jtparkHi Jeongtae,
For the next version of the series you send out, can you please make sure the series is threaded? Currently all your series are coming as individual mails. Thanks!
Sorry about that, I think there a problem of mail security system at that time. I'll test internally before sending the patch series.
Thanks!
Quoted 17 lines
Quoted 17 lines
Jeongtae Park (3):
cxl: Modify background cmd handling for the others cxl/mbox: Update sanitize opcode support cxl/memdev: Add background command sysfs fileDocumentation/ABI/testing/sysfs-bus-cxl | 10 ++++ drivers/cxl/core/mbox.c | 5 +- drivers/cxl/core/memdev.c | 71 +++++++++++++++++++++++-- drivers/cxl/cxlmem.h | 33 ++++++++++-- drivers/cxl/pci.c | 65 +++++++++++----------- 5 files changed, 141 insertions(+), 43 deletions(-)base-commit:
fe77cc2e5a6a7c85f5c6ef8a39d7694ffc7f41c9
Quoted 9 lines · Jeongtae Park
Hello,
We are currently trying to add background commands like fw-related and sanitize operation. However, as we modified the code, we found that there was a lot of duplication of code, so we would like to modify the existing background command handling a little bit. We want to make the most of the existing background command handling so that we can easily add other background commands in the future.
What code duplication? All you need to do is arm the struct cxl_mbox_cmd with sensible timeouts. For example, see 9521875bbe0 (cxl: add a firmware update mechanism using the sysfs firmware loader).
Quoted 7 lines
The first patch modifies the existing sanitize operation handling to allow other background commands to be used with it, and the second patch modifies sanitize to work with the modified code. Finally, the third patch adds a sysfs file related to the background operation. This sysfs entry is select/poll capable from userspace to notify upon completion of a background operation.
This says nothing about the motivation of these changes. Specially when it has been well discussed in the past that exactly because of its monopolizing nature, the driver will _only_ do sanitize asynchronously. See the changelog of ccadf1310fb (cxl/mbox: Add background cmd handling machinery).
Thanks,
Davidlohr
Quoted 25 lines · Davidlohr Bueso
Quoted 9 lines · Jeongtae Park
Hello,
We are currently trying to add background commands like fw-related and sanitize operation. However, as we modified the code, we found that there was a lot of duplication of code, so we would like to modify the existing background command handling a little bit. We want to make the most of the existing background command handling so that we can easily add other background commands in the future.
What code duplication? All you need to do is arm the struct
cxl_mbox_cmdwith sensible timeouts. For example, see9521875bbe0(cxl: add a firmware update mechanism using the sysfs firmware loader).Quoted 7 lines
The first patch modifies the existing sanitize operation handling to allow other background commands to be used with it, and the second patch modifies sanitize to work with the modified code. Finally, the third patch adds a sysfs file related to the background operation. This sysfs entry is select/poll capable from userspace to notify upon completion of a background operation.
Quoted 8 lines
This says nothing about the motivation of these changes. Specially when it has been well discussed in the past that exactly because of its monopolizing nature, the driver will _only_ do sanitize asynchronously. See the changelog of
ccadf1310fb(cxl/mbox: Add background cmd handling machinery).Thanks,
Davidlohr
Hello Davidlohr,
I'm afraid that as you mentioned, the cover letter didn't seem to be written including the problems need to be improved (we are guessing) and our intentions. I'll review history about them, and make more specific examples to explain our intentions and how we're going to fix it.
(Sorry for late reply, We've been on long holiday for a while.)
Thanks!
/jtpark