All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2] x86/xen: add reschedule point when mapping foreign GFNs
@ 2015-10-28 13:39 David Vrabel
  2015-10-28 13:42 ` Boris Ostrovsky
  0 siblings, 1 reply; 2+ messages in thread
From: David Vrabel @ 2015-10-28 13:39 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>
---
v2:
- Move cond_resched() to outer loop.
---
 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..ac161db 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -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:
 
-- 
2.1.4

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

* Re: [PATCHv2] x86/xen: add reschedule point when mapping foreign GFNs
  2015-10-28 13:39 [PATCHv2] x86/xen: add reschedule point when mapping foreign GFNs David Vrabel
@ 2015-10-28 13:42 ` Boris Ostrovsky
  0 siblings, 0 replies; 2+ messages in thread
From: Boris Ostrovsky @ 2015-10-28 13:42 UTC (permalink / raw)
  To: David Vrabel, xen-devel

On 10/28/2015 09:39 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@citrix.com>
> ---
> v2:
> - Move cond_resched() to outer loop.
> ---
>   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..ac161db 100644
> --- a/arch/x86/xen/mmu.c
> +++ b/arch/x86/xen/mmu.c
> @@ -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:
>   


Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>

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

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

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.