x86/xen: add reschedule point when mapping foreign GFNs
Subsystems (2)
PATCH v2 1/1 x86/xen: add reschedule point when mapping foreign GFNs
Mapping a large range of foreign GFNs can take a long time, add a reschedule point after each batch of 16 GFNs.
Signed-off-by David Vrabel <[email protected]>
---
v2:
- Move cond_resched() to outer loop.
--- arch/x86/xen/mmu.c | 1 + 1 file changed, 1 insertion(+)
arch/x86/xen/mmu.c +1 -0
@@ -2888,6 +2888,7 @@ static int do_remap_gfn(struct vm_area_struct *vma, addr += range;if (err_ptr) err_ptr += batch; +cond_resched (); } out:
Signature · 1 line
2.1.4
Quoted 16 lines · David Vrabel
Mapping a large range of foreign GFNs can take a long time, add a reschedule point after each batch of 16 GFNs.
Signed-off-by David Vrabel <[email protected]>---
v2:
- Movecond_resched()to outer loop.--- arch/x86/xen/mmu.c | 1 + 1 file changed, 1 insertion(+)arch/x86/xen/mmu.c +0
-0
arch/x86/xen/mmu.c static int do_remap_gfn(struct vm_area_struct *vma, · line 2894
Quoted 7 lines
arch/x86/xen/mmu.c +1
-0@@ -2888,6 +2888,7 @@ static int do_remap_gfn(struct vm_area_struct *vma, addr += range;if (err_ptr) err_ptr += batch; +cond_resched (); } out:
Reviewed-by Boris Ostrovsky <[email protected]>