From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: [PATCHv1] x86/xen: add reschedule point when mapping foreign GFNs Date: Tue, 27 Oct 2015 11:50:02 +0000 Message-ID: <1445946602-27588-1-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Zr2lY-0006Vz-3d for xen-devel@lists.xenproject.org; Tue, 27 Oct 2015 11:50:12 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Boris Ostrovsky , David Vrabel List-Id: xen-devel@lists.xenproject.org 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 --- 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