dmaengine: idxd: add per file user counters for completion record faults
authorDave Jiang <dave.jiang@intel.com>
Fri, 7 Apr 2023 20:31:39 +0000 (13:31 -0700)
committerVinod Koul <vkoul@kernel.org>
Wed, 12 Apr 2023 17:48:45 +0000 (23:18 +0530)
commitfecae134ee10b7de69461c197450f7c05677e733
treec1b39c24d395ab96d8b61bd6fdab77eb23911e78
parent2442b7473ad03671378d2d95651bd6bbe09a0943
dmaengine: idxd: add per file user counters for completion record faults

Add counters per opened file for the char device in order to keep track how
many completion record faults occurred and how many of those faults failed
the writeback by the driver after attempt to fault in the page. The
counters are managed by xarray that associates the PASID with
struct idxd_user_context.

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-13-fenghua.yu@intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/idxd/cdev.c
drivers/dma/idxd/idxd.h
drivers/dma/idxd/irq.c