compute-runtime
compute-runtime copied to clipboard
Make access to sysfs lock-free
This PR aims to remove the lock used in SysFsAccessInterface. The lock is not necessary and should be avoided based on below facts:
- Simultaneous read/write operations against the same sysfs instance are atomic by design.
- For simultaneous read/write operations to different sysfs instances belonging to the same device, it's the driver's responsibility to ensure the data consistency. If a lock is needed at user-level, this usually indicates defect at device driver.
- According to the spec of Level Zero, most get/set function has the note
The implementation of this function should be lock-free..
According to the spec of Level Zero, most get/set function has the note
The implementation of this function should be lock-free.. Yes, It is recommended to have the implementation lock-free and not a mandatory requirement. Please refer to Terminology.
Can you please let us know actual requirement/issue so that, We will try to support.