OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf0d53b
)
vfio/spapr: Add cond_resched() for huge updates
author
Alexey Kardashevskiy
<aik@ozlabs.ru>
Mon, 2 Oct 2017 18:39:11 +0000
(12:39 -0600)
committer
Alex Williamson
<alex.williamson@redhat.com>
Mon, 2 Oct 2017 18:39:11 +0000
(12:39 -0600)
Clearing very big IOMMU tables can trigger soft lockups. This adds
cond_resched() to allow the scheduler to do context switching when
it decides to.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/vfio_iommu_spapr_tce.c
patch
|
blob
|
history
diff --git
a/drivers/vfio/vfio_iommu_spapr_tce.c
b/drivers/vfio/vfio_iommu_spapr_tce.c
index
63112c3
..
759a5bd
100644
(file)
--- a/
drivers/vfio/vfio_iommu_spapr_tce.c
+++ b/
drivers/vfio/vfio_iommu_spapr_tce.c
@@
-507,6
+507,8
@@
static int tce_iommu_clear(struct tce_container *container,
enum dma_data_direction direction;
for ( ; pages; --pages, ++entry) {
+ cond_resched();
+
direction = DMA_NONE;
oldhpa = 0;
ret = iommu_tce_xchg(tbl, entry, &oldhpa, &direction);