Skip to content

vfio/iommufd: Prevent scheduler warnings when unmapping large regions

Aaron Lewis kvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2vfio/type1: Periodically try rescheduling when unmappingdrivers/vfio/vfio_iommu_type1.c+3 -02 replies
2/2iommufd: Periodically reschedule when unmappingdrivers/iommu/iommufd/pages.c+4 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] vfio/iommufd: Prevent scheduler warnings when unmapping large regions

Both the Type1 IOMMU and IOMMUFD can be guilty of not playing nice with the scheduler during DMA unmapping on large regions (e.g., 256GB). Add rate-limited calls to cond_resched() to ensure this doesn't happen.

This series was tested using the selftest proposed here:
- https://lore.kernel.org/kvm/[email protected]/

And profiled using the bpftrace tooling proposed here:
- https://lore.kernel.org/kvm/[email protected]/

Note that the kernel must be built with preemption disabled and have LATENCY_WARN enabled in order to trigger the warnings. With those conditions met, the issue should reproduce as described in the changelogs.

Aaron Lewis (2):
vfio/type1: Periodically try rescheduling when unmapping
iommufd: Periodically reschedule when unmapping

 drivers/iommu/iommufd/pages.c   | 4 ++++
 drivers/vfio/vfio_iommu_type1.c | 3 +++
 2 files changed, 7 insertions(+)
Signature · 1 line
2.55.0.141.g00534a21ce-goog