xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv1] x86/xen: add reschedule point when mapping foreign GFNs
@ 2015-10-27 11:50 David Vrabel
  2015-10-28 13:10 ` Boris Ostrovsky
  0 siblings, 1 reply; 2+ messages in thread
From: David Vrabel @ 2015-10-27 11:50 UTC (permalink / raw)
  To: xen-devel; +Cc: Boris Ostrovsky, 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 <david.vrabel@citrix.com>
---
 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;
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-28 13:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-27 11:50 [PATCHv1] x86/xen: add reschedule point when mapping foreign GFNs David Vrabel
2015-10-28 13:10 ` Boris Ostrovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).