dmaengine: idxd: expose fault counters to sysfs
authorDave Jiang <dave.jiang@intel.com>
Fri, 7 Apr 2023 20:31:41 +0000 (13:31 -0700)
committerVinod Koul <vkoul@kernel.org>
Wed, 12 Apr 2023 17:48:46 +0000 (23:18 +0530)
commit244009b07e7d0728726f266cc3485d7fd400d0d5
tree8c4e1f5c12db5c898d527cfb26e803155a397087
parente6fd6d7e5f0fe4a17a08e892afb5db800e7794ec
dmaengine: idxd: expose fault counters to sysfs

Expose cr_faults and cr_fault_failures counters to the user space. This
allows a user app to keep track of how many fault the application is
causing with the completion record (CR) and also the number of failures
of the CR writeback. Having a high number of cr_fault_failures is bad as
the app is submitting descriptors with the CR addresses that are bad. User
monitoring daemon may want to consider killing the application as it may be
malicious and attempting to flood the device event log.

Tested-by: Tony Zhu <tony.zhu@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Co-developed-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Link: https://lore.kernel.org/r/20230407203143.2189681-15-fenghua.yu@intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Documentation/ABI/stable/sysfs-driver-dma-idxd
drivers/dma/idxd/cdev.c