compute-runtime icon indicating copy to clipboard operation
compute-runtime copied to clipboard

Make access to sysfs lock-free

Open ms-hujia opened this issue 3 months ago • 1 comments

This PR aims to remove the lock used in SysFsAccessInterface. The lock is not necessary and should be avoided based on below facts:

  1. Simultaneous read/write operations against the same sysfs instance are atomic by design.
  2. 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.
  3. According to the spec of Level Zero, most get/set function has the note The implementation of this function should be lock-free..

ms-hujia avatar Sep 24 '25 02:09 ms-hujia

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.

bellekal avatar Oct 10 '25 11:10 bellekal