diff options
author | Dave Jiang <dave.jiang@intel.com> | 2023-04-07 22:31:36 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2023-04-12 19:48:45 +0200 |
commit | c40bd7d9737bdcfb02d42765bc6c59b338151123 (patch) | |
tree | 77d85ebb3c91ae538bd6c18d857f38dff6cc4546 /drivers/bus | |
parent | dmaengine: idxd: add idxd_copy_cr() to copy user completion record during pag... (diff) | |
download | linux-c40bd7d9737bdcfb02d42765bc6c59b338151123.tar.xz linux-c40bd7d9737bdcfb02d42765bc6c59b338151123.zip |
dmaengine: idxd: process user page faults for completion record
DSA supports page fault handling through PRS. However, the DMA engine
that's processing the descriptor is blocked until the PRS response is
received. Other workqueues sharing the engine are also blocked.
Page fault handing by the driver with PRS disabled can be used to
mitigate the stalling.
With PRS disabled while ATS remain enabled, DSA handles page faults on
a completion record by reporting an event in the event log. In this
instance, the descriptor is completed and the event log contains the
completion record address and the contents of the completion record. Add
support to the event log handling code to fault in the completion record
and copy the content of the completion record to user memory.
A bitmap is introduced to keep track of discarded event log entries. When
the user process initiates ->release() of the char device, it no longer is
interested in any remaining event log entries tied to the relevant wq and
PASID. The driver will mark the event log entry index in the bitmap. Upon
encountering the entries during processing, the event log handler will just
clear the bitmap bit and skip the entry rather than attempt to process the
event log entry.
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-10-fenghua.yu@intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/bus')
0 files changed, 0 insertions, 0 deletions