From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: David Vrabel <david.vrabel@citrix.com>, xen-devel@lists.xenproject.org
Subject: Re: [PATCHv1] x86/xen: add reschedule point when mapping foreign GFNs
Date: Wed, 28 Oct 2015 09:10:56 -0400 [thread overview]
Message-ID: <5630C960.908@oracle.com> (raw)
In-Reply-To: <1445946602-27588-1-git-send-email-david.vrabel@citrix.com>
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@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;
Shouldn't this be done in the outer (i.e. 'while (nr)') loop? The inner
loop always processes 16 pages.
-boris
prev parent reply other threads:[~2015-10-28 13:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5630C960.908@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).