CodeConstruct / dbus-sensors

D-Bus configurable sensor scanning applications
Apache License 2.0
0 stars 3 forks source link

[enhancement] improve createNamespace() #13

Open drakedog2008 opened 8 months ago

drakedog2008 commented 8 months ago

Hi @mkj,

Jinliang get an idea to improve the createNamespace() process:

https://gbmc-review.googlesource.com/c/dbus-sensors/+/13495.

Would you like to take a look?

drakedog2008 commented 8 months ago

I am personally agree with the first two statement:

1) We don't need to getBlockSize on every NVMeMi::createNamespace request. During start up, NVMeSubsystem::querySupportedFormats' already read it, so we can save it and re-use it. By this way, we can avoid the 4KB nvme_mi_admin_identify_ns read command. 2) Since we don't needgetBlockSize, we can merge the original submitted_cbandfinished_cb` into one callback

But I have concerns with the third one:

3) Even we don't need async NVMeCreateVolumeProgress task for createVolume, but the Redfish interface is already used by other client. To keep compatible with existing clients, so we still create a NVMeCreateVolumeProgress, and mark it as finished right away.

Given that the Volume creation processing time would be long and the async progress still benefits to prevent from the client (dbus or higher) from timeout.

mkj commented 8 months ago

@drakedog2008 I've added a comment in Gerrit there. I'm uncertain whether hardware exists that has a > 25s time for namespace create.