[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCHv1] x86/xen: add reschedule point when mapping foreign GFNs



On 10/27/2015 07:50 AM, David Vrabel wrote:
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@xxxxxxxxxx>
---
  arch/x86/xen/mmu.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index 9c479fe..734fa84 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -2882,6 +2882,7 @@ static int do_remap_gfn(struct vm_area_struct *vma,
                                mapped += done;
                        batch_left -= done;
                        index += done;
+                       cond_resched();
                } while (batch_left);
nr -= batch;

Shouldn't this be done in the outer (i.e. 'while (nr)') loop? The inner loop always processes 16 pages.

-boris

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.