Intel NPU Driver Preparing Hardware Scheduler & Profiling Support
- Reference: 0001463189
- News link: https://www.phoronix.com/news/Intel-iVPU-Driver-NPU-Linux-610
- Source link:
With Linux 6.10 the Intel NPU accelerator driver is adding hardware scheduler support but at least for now is disabled by default. This hardware scheduler "HWS" is described as being a firmware-side feature that may not be found with all hardware generations and firmware versions. It's disabled by default and depends upon the "ivpu.sched_mode=1" module parameter to be set for leveraging the hardware scheduler where supported rather than relying on the OS scheduler. The NPU hardware scheduler should be more efficient and potentially yield better performance than the driver's software scheduler for NPU jobs. As part of this hardware scheduler enablement, the iVPU driver now sets up multiple command queues per engine with classifying different priorities.
Another new feature for the Intel NPU on Linux 6.10 is adding initial profiling support. The iVPU driver is providing a time-based Metric Streamer profiling user-space API for allowing user-space tools to query NPU metrics exposed by the firmware.
A third new feature for Linux 6.10 is exposing a "npu_busy_time_us" file via sysfs that allows reporting to user-space the amount of time spent by the NPU executing jobs. In turn this new sysfs file can be leveraged by user-space for monitoring NPU device utilization.
All of these Intel NPU open-source kernel driver changes were submitted as part of [2]this patch series to DRM-Next ahead of the upcoming Linux 6.10 merge window.
[1] https://www.phoronix.com/search/Linux+6.10
[2] https://lore.kernel.org/dri-devel/20240508132106.2387464-1-jacek.lawrynowicz@linux.intel.com/T/#m2657016e63c95a7dc7df1a8b8638a03c2e737729
Eirikr1848