Browse Source

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 <david.vrabel@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
David Vrabel 9 years ago
parent
commit
914beb9fc2
1 changed files with 1 additions and 0 deletions
  1. 1 0
      arch/x86/xen/mmu.c

+ 1 - 0
arch/x86/xen/mmu.c

@@ -2888,6 +2888,7 @@ static int do_remap_gfn(struct vm_area_struct *vma,
 		addr += range;
 		addr += range;
 		if (err_ptr)
 		if (err_ptr)
 			err_ptr += batch;
 			err_ptr += batch;
+		cond_resched();
 	}
 	}
 out:
 out: