Add log related mailbox commands
Quoted 70 lines · Jonathan Cameron
Quoted 27 lines · Srinivasulu Opensrc
Quoted 27 lines
-----Original Message-----
From: Dan Williams <[email protected]>
Sent: Wednesday, March 27, 2024 5:07 AM
To: Srinivasulu Opensrc <[email protected]>; linux- [email protected]
Cc: [email protected]; [email protected]; [email protected]; Eishan Mirakhur <[email protected]>; Ajay Joshi <[email protected]>; Ravis OpenSrc <[email protected]>; Srinivasulu Thanneeru <[email protected]>
Subject: [EXT] RE: [PATCH v3 0/2] Add log related mailbox commandsCAUTION: EXTERNAL EMAIL. Do not click links or open attachments unless you recognize the sender and were expecting this message.
Quoted 10 lines · sthanneeru.opensrc@ wrote:
From: Srinivasulu Thanneeru <[email protected]>
Add support to expose following mailbox commands to userspace for clearing and populating the Vendor debug log in certain scenarios, allowing for the aggregation of results over time.
1. CXL r3.1 8.2.9.5.3 Get Log Capabilities.
2. CXL r3.1 8.2.9.5.4 Clear Log commands.
3. CXL r3.1 8.2.9.5.6 Get Supported Logs Sub-List.Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
---
Changes in v3:
- 'Component State Dump log' has several caveats forioctl()not being a suitable ABI as pointed in v2.(Dan Williams)
- Remove Component State Dump from Clear log filter.
- Implement a seperate patch(yet to do) to address issues as pointed inv2.
Quoted 3 lines
Quoted 3 lines
Circling back to this question... I had overlooked the fact that in v3.1 the "Request Abort Background Operation" command was added
(8.2.9.1.5).
Quoted 9 lines
Quoted 5 lines
With that the kernel can safely support background commands with indefinite residency. So as long as the device supports that command and advertises that Log populate requests can be cancelled then we can build a facility to cancel any user-submitted background commands when a kernel internal need for the background command slot arises.
I don't have the access to test "Request Abort Background Operation." Previously, we posted RFC for default time for background operations.
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore
Quoted 1 line
.kernel.org%2Flinux-mm%2F20240207105349.301-1-
sthanneeru.opensrc%40mic
Quoted 1 line
ron.com%2F&data=05%7C02%7Cajayjoshi%40micron.com%7Cabe61f69d40
2460e2f2Quoted 1 line
b08dc55964860%7Cf38a5ecd28134862b11bac1d563c806f%7C0%7C0%7C 63847935119
Quoted 1 line
7749869%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoi V2luMzIiLC
Quoted 1 line
JBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=QyxjJi2iLMTSTl R46rv9k5
Quoted 3 lines
U%2FDZVrKruaaunew8HMR9E%3D&reserved=0
Could you please guide me on how to proceed with this current patch
series?
Quoted 9 lines
Whilst QEMU emulation doesn't yet support background command aborting, it wouldn't be that hard to add and would provide a route to test this functionality.
We've done similar in a few other cases where no one had any hardware yet.Of course that might not help you if you have silicon that doesn't implement it but I agree with Dan that it is a lot less problematic to allow for unbounded background ops if we can stop them for other urgent activity.
Thanks Jonathan and Dan. Agree with you on the background command handling. The series which Srini (sthanneeru.opensrc) has submitted has 2 patches:
cxl/mbox: Add Get Log Capabilities and Get Supported Logs Sub-List
commands
cxl/mbox: Add Clear Log mailbox command
The commands in these patches(opcodes: 0402h, 0403h, 0405h) don't seem to have any background handling as of 3.1.
Do you think these patches seem ok or do you feel something
is missing here?
Ajay
Quoted 1 line
Jonathan
Quoted 101 lines
Quoted 37 lines · Jonathan Cameron
Quoted 27 lines · Srinivasulu Opensrc
Quoted 27 lines
-----Original Message-----
From: Dan Williams <[email protected]>
Sent: Wednesday, March 27, 2024 5:07 AM
To: Srinivasulu Opensrc <[email protected]>; linux- [email protected]
Cc: [email protected]; [email protected]; [email protected]; Eishan Mirakhur <[email protected]>; Ajay Joshi <[email protected]>; Ravis OpenSrc <[email protected]>; Srinivasulu Thanneeru <[email protected]>
Subject: [EXT] RE: [PATCH v3 0/2] Add log related mailbox commandsCAUTION: EXTERNAL EMAIL. Do not click links or open attachments unless you recognize the sender and were expecting this message.
Quoted 10 lines · sthanneeru.opensrc@ wrote:
From: Srinivasulu Thanneeru <[email protected]>
Add support to expose following mailbox commands to userspace for clearing and populating the Vendor debug log in certain scenarios, allowing for the aggregation of results over time.
1. CXL r3.1 8.2.9.5.3 Get Log Capabilities.
2. CXL r3.1 8.2.9.5.4 Clear Log commands.
3. CXL r3.1 8.2.9.5.6 Get Supported Logs Sub-List.Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
---
Changes in v3:
- 'Component State Dump log' has several caveats forioctl()not being a suitable ABI as pointed in v2.(Dan Williams)
- Remove Component State Dump from Clear log filter.
- Implement a seperate patch(yet to do) to address issues as pointed inQuoted 10 lines
v2.
Quoted 3 lines
Quoted 3 lines
Circling back to this question... I had overlooked the fact that in v3.1 the "Request Abort Background Operation" command was added
(8.2.9.1.5).
Quoted 5 lines
Quoted 5 lines
With that the kernel can safely support background commands with indefinite residency. So as long as the device supports that command and advertises that Log populate requests can be cancelled then we can build a facility to cancel any user-submitted background commands when a kernel internal need for the background
command slot arises.
Quoted 6 lines
Quoted 4 lines
I don't have the access to test "Request Abort Background Operation." Previously, we posted RFC for default time for background operations.
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore
%2F&data=05%7C02%7Cajayjoshi%40micron.com%7Cf8029f5d498b4f0e64fb 08dc58
Quoted 1 line
387ed0%7Cf38a5ecd28134862b11bac1d563c806f%7C0%7C0%7C6384822468 83954825
Quoted 1 line
%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiL CJBTiI6I
Quoted 1 line
k1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=Lv366Ff7nRD9zI6F0AQC e%2F9f%2F
Quoted 13 lines
QwNiL%2FCpND2cpfX6E0%3D&reserved=0
Quoted 1 line
.kernel.org%2Flinux-mm%2F20240207105349.301-1-
sthanneeru.opensrc%40mic
Quoted 1 line
ron.com%2F&data=05%7C02%7Cajayjoshi%40micron.com%7Cabe61f69d40
2460e2f2Quoted 1 line
b08dc55964860%7Cf38a5ecd28134862b11bac1d563c806f%7C0%7C0%7C 63847935119
Quoted 1 line
7749869%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoi V2luMzIiLC
Quoted 1 line
Quoted 8 lines
JBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=QyxjJi2iLMTSTl R46rv9k5
Quoted 3 lines
U%2FDZVrKruaaunew8HMR9E%3D&reserved=0
Could you please guide me on how to proceed with this current patch
series?
Whilst QEMU emulation doesn't yet support background command
aborting,
Quoted 3 lines
it wouldn't be that hard to add and would provide a route to test this functionality.
We've done similar in a few other cases where no one had any hardwareyet.
Quoted 4 lines
Of course that might not help you if you have silicon that doesn't implement it but I agree with Dan that it is a lot less problematic to allow for unbounded background ops if we can stop them for other urgent
activity.
Quoted 1 line
Quoted 11 lines
Thanks Jonathan and Dan. Agree with you on the background command handling.
The series which Srini (sthanneeru.opensrc) has submitted has 2 patches:
cxl/mbox: Add Get Log Capabilities and Get Supported Logs Sub-List
commands
cxl/mbox: Add Clear Log mailbox command
The commands in thesepatches(opcodes: 0402h, 0403h, 0405h)don't seem to have any background handling as of 3.1.
Do you think these patches seem ok or do you feel something is missing here?
Any input or review comment here would be highly appreciated.
Quoted 4 lines
Ajay
Quoted 1 line
Jonathan