x86/xen: add reschedule point when mapping foreign GFNs
authorDavid Vrabel <david.vrabel@citrix.com>
Wed, 28 Oct 2015 13:39:05 +0000 (13:39 +0000)
committerDavid Vrabel <david.vrabel@citrix.com>
Wed, 28 Oct 2015 13:46:27 +0000 (13:46 +0000)
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>
arch/x86/xen/mmu.c

index 9c479fe4045912d9152315bc1fa4af9ed334304b..ac161db633885872fdebdce976d05b978e1235da 100644 (file)
@@ -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: