xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Keir Fraser <keir.fraser@eu.citrix.com>
To: Kaushik Kumar Ram <kaushik@rice.edu>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: question on iommu _map_page
Date: Fri, 2 Jul 2010 11:41:21 +0100	[thread overview]
Message-ID: <C85380E1.1948D%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <C8535035.1945A%keir.fraser@eu.citrix.com>

On 02/07/2010 08:13, "Keir Fraser" <keir.fraser@eu.citrix.com> wrote:

>> I finally found some time to test your patch. While it seems to fix the
>> problem, it *significantly* degrades performance.
>> On running netperf, there is a 10X reduction in throughput to a guest VM. On
>> profiling, I find a significant number of cycles
>> being spent in mapcount(). In the current solution, the entire grant table is
>> searched every time (right ?). The mapping info
>> ought to be stored in some per-page location... for efficient access.
> 
> It needs to be a per-mapping-domain location. Like the VT-d pte itself.
> Patches welcome.

Scrub that. It would be better to allocate a chunk of otherwised unused
machine address space (e.g., 1GB starting at max(4GB, top_of_ram)), and
allocate each grant entry that needs an iommu mapping a page in that range,
map at that address and return that address as dev_bus_addr from the
grant-map hypercall. Then we would have no IOMMU pte sharing between grants,
and no need for any extra reference counting. Also it would be easy to batch
iommu flushes in this scenario, if you don't care about finished-with grant
mappings being flushed a bit lazily.

 -- Keir

      reply	other threads:[~2010-07-02 10:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-27 20:37 question on iommu _map_page Kaushik Kumar Ram
2010-05-27 20:46 ` Keir Fraser
2010-05-27 20:59   ` Kaushik Kumar Ram
2010-05-28  8:08     ` Keir Fraser
2010-05-28 23:20       ` Kaushik Kumar Ram
2010-05-29  7:29         ` Keir Fraser
2010-05-29  8:08           ` Kaushik Kumar Ram
2010-06-10 21:59       ` Kaushik Kumar Ram
2010-06-11  8:32         ` Keir Fraser
2010-07-02  6:22           ` Kaushik Kumar Ram
2010-07-02  7:13             ` Keir Fraser
2010-07-02 10:41               ` Keir Fraser [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=C85380E1.1948D%keir.fraser@eu.citrix.com \
    --to=keir.fraser@eu.citrix.com \
    --cc=kaushik@rice.edu \
    --cc=xen-devel@lists.xensource.com \
    /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).