All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Limpach <christian.limpach@gmail.com>
To: Aravindh Puthiyaparambil <aravindh@virtuata.com>
Cc: tim@xen.org, xen-devel@lists.xen.org
Subject: Re: [PATCH 0 of 2] Add libxc API that sets mem_access type for an array of gfns
Date: Thu, 26 Apr 2012 13:20:00 -0700	[thread overview]
Message-ID: <CAHDtvhrmhhgxMYg4Lguums83tgsp6z+RDipj2ZkN7MvMNk+zbw@mail.gmail.com> (raw)
In-Reply-To: <patchbomb.1335465209@vollum>

On Thu, Apr 26, 2012 at 11:33 AM, Aravindh Puthiyaparambil
<aravindh@virtuata.com> wrote:
> When the mem_access type needs to be changed for multiple discontiguous gfns, calling xc_hvm_set_mem_access() multiple times does not perform very well. The main pain points are the multiple libxc calls themselves plus the multiple map_domain_page() / unmap_domain_page() and ept_sync_domain() calls for each ept_set_entry(gfn). The following patches adds a new mem_access API that sets the mem_access type for an array of guest physical addresses in one libxc call with minimal map_domain_page() / unmap_domain_page() and ept_sync_domain() calls.


Are you sure that your bulk code actually works?  It seems to me that
your __ept_set_entry function assumes that table still points to the
top of the p2m.  The "for ( i = ept_get_wl(d); i > target; i-- )" loop
will walk the table, and so in the subsequent calls from your bulk
loop, this won't work?

I think you need something like an iterator, the context of which can
be passed around...

Also, the call to ept_get_entry in your bulk loop will do a walk in
every iteration, it seems a bit arbitrary to only (try to) avoid one
and not the other.  But I guess the "win" is from reducing the number
of ept_sync_domain calls.

    christian

  parent reply	other threads:[~2012-04-26 20:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-26 18:33 [PATCH 0 of 2] Add libxc API that sets mem_access type for an array of gfns Aravindh Puthiyaparambil
2012-04-26 18:33 ` [PATCH 1 of 2] x86/mm: Split ept_set_entry() Aravindh Puthiyaparambil
2012-04-26 18:33 ` [PATCH 2 of 2] mem_access: Add xc_hvm_mem_access_bulk() API Aravindh Puthiyaparambil
2012-04-26 20:20 ` Christian Limpach [this message]
2012-04-26 22:41   ` [PATCH 0 of 2] Add libxc API that sets mem_access type for an array of gfns Aravindh Puthiyaparambil
2012-04-27  0:15     ` Aravindh Puthiyaparambil
2012-04-27  1:06       ` Christian Limpach
2012-04-27  1:36         ` Aravindh Puthiyaparambil
2012-04-27  8:48           ` Tim Deegan
2012-04-27 18:26             ` Aravindh Puthiyaparambil
2012-04-27 17:37           ` Christian Limpach
2012-04-27 18:25             ` Aravindh Puthiyaparambil
2012-04-28  4:22               ` Aravindh Puthiyaparambil
2012-05-03  3:28                 ` Christian Limpach
2012-05-04 22:02                   ` Aravindh Puthiyaparambil
2012-05-17 10:05                     ` Tim Deegan
2012-05-17 18:43                       ` Aravindh Puthiyaparambil

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=CAHDtvhrmhhgxMYg4Lguums83tgsp6z+RDipj2ZkN7MvMNk+zbw@mail.gmail.com \
    --to=christian.limpach@gmail.com \
    --cc=aravindh@virtuata.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.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 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.