All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Daniel Jordan <daniel.m.jordan@oracle.com>
Cc: Cornelia Huck <cohuck@redhat.com>,
	Jason Gunthorpe <jgg@nvidia.com>,
	Matthew Wilcox <willy@infradead.org>,
	Pavel Tatashin <pasha.tatashin@soleen.com>,
	Steven Sistare <steven.sistare@oracle.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/3] vfio/type1: Batch page pinning
Date: Tue, 23 Feb 2021 11:24:27 -0700	[thread overview]
Message-ID: <20210223112427.682b8ce9@omen.home.shazbot.org> (raw)
In-Reply-To: <20210219161305.36522-1-daniel.m.jordan@oracle.com>

On Fri, 19 Feb 2021 11:13:02 -0500
Daniel Jordan <daniel.m.jordan@oracle.com> wrote:

> v2:
>  - Fixed missing error unwind in patch 3 (Alex).  After more thought,
>    the ENODEV case is fine, so it stayed the same.
> 
>  - Rebased on linux-vfio.git/next (no conflicts).
> 
> ---
> 
> The VFIO type1 driver is calling pin_user_pages_remote() once per 4k page, so
> let's do it once per 512 4k pages to bring VFIO in line with other drivers such
> as IB and vDPA.
> 
> qemu guests with at least 2G memory start about 8% faster on a Xeon server,
> with more detailed results in the last changelog.
> 
> Thanks to Matthew, who first suggested the idea to me.
> 
> Daniel
> 
> 
> Test Cases
> ----------
> 
>  1) qemu passthrough with IOMMU-capable PCI device
> 
>  2) standalone program to hit
>         vfio_pin_map_dma() -> vfio_pin_pages_remote()
> 
>  3) standalone program to hit
>         vfio_iommu_replay() -> vfio_pin_pages_remote()
> 
> Each was run...
> 
>  - with varying sizes
>  - with/without disable_hugepages=1
>  - with/without LOCKED_VM exceeded
> 
> I didn't test vfio_pin_page_external() because there was no readily available
> hardware, but the changes there are pretty minimal.
> 
> Daniel Jordan (3):
>   vfio/type1: Change success value of vaddr_get_pfn()
>   vfio/type1: Prepare for batched pinning with struct vfio_batch
>   vfio/type1: Batch page pinning
> 
>  drivers/vfio/vfio_iommu_type1.c | 215 +++++++++++++++++++++++---------
>  1 file changed, 155 insertions(+), 60 deletions(-)
> 
> base-commit: 76adb20f924f8d27ed50d02cd29cadedb59fd88f

Applied to vfio next branch for v5.12.  Thanks,

Alex


      parent reply	other threads:[~2021-02-23 18:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19 16:13 [PATCH v2 0/3] vfio/type1: Batch page pinning Daniel Jordan
2021-02-19 16:13 ` [PATCH v2 1/3] vfio/type1: Change success value of vaddr_get_pfn() Daniel Jordan
2021-02-19 16:13 ` [PATCH v2 2/3] vfio/type1: Prepare for batched pinning with struct vfio_batch Daniel Jordan
2021-02-19 16:13 ` [PATCH v2 3/3] vfio/type1: Batch page pinning Daniel Jordan
2021-03-23 19:32   ` Alex Williamson
2021-03-23 22:25     ` Daniel Jordan
2021-03-23 23:09       ` Alex Williamson
2021-02-23 18:24 ` Alex Williamson [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=20210223112427.682b8ce9@omen.home.shazbot.org \
    --to=alex.williamson@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=daniel.m.jordan@oracle.com \
    --cc=jgg@nvidia.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pasha.tatashin@soleen.com \
    --cc=steven.sistare@oracle.com \
    --cc=willy@infradead.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.