xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Thanos Makatos <thanos.makatos@citrix.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "boris.ostrovsky@oracle.com" <boris.ostrovsky@oracle.com>
Subject: Re: [PATCH] introduce grant copy for user land
Date: Tue, 11 Nov 2014 13:34:18 +0000	[thread overview]
Message-ID: <5462105A.6020100@citrix.com> (raw)
In-Reply-To: <2368A3FCF9F7214298E53C823B0A48EC04289299@AMSPEX01CL02.citrite.net>

On 11/11/14 12:27, Thanos Makatos wrote:
>> The arbitrary limitations in number of ops and page alignment should be
>> removed.  I think both can be removed relatively easily by consuming page
>> aligned chunks of segments and doign the hypercall when a batch of ops is
>> filled.
> 
> Wouldn't this lead to multiple calls to gnttab_batch_copy(), potentially hurting performance?

The incremental benefits of batching diminishes as the batch size increase.

We also don't want multi-page allocations in this driver, so the batch
size should be set accordingly.

>>> +#define IOCTL_GNTDEV_GRANT_COPY \
>>> +_IOC(_IOC_NONE, 'G', 8, sizeof(struct ioctl_gntdev_grant_copy))
>>> +struct ioctl_gntdev_grant_copy {
>>> +	/*
>>> +	 * copy direction: 0 to copy to guest, 1 to copy from guest
>>> +	 */
>>> +	int dir;
>>
>> I think this dir should be per-segment and use the GNTCPY_source_gref and
>> GNTCOPY_dest_gref flags, since per-op direction is what the hypercall
>> provides.
> 
> OK.

The interface should also support grant to grant copies.

David

  reply	other threads:[~2014-11-11 13:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-02 15:15 [PATCH] introduce grant copy for user land Thanos Makatos
2014-11-03 18:03 ` David Vrabel
2014-11-11 12:27   ` Thanos Makatos
2014-11-11 13:34     ` David Vrabel [this message]
2014-11-11 14:42       ` Thanos Makatos
2014-11-11 15:06         ` David Vrabel
2014-11-11 15:23           ` Thanos Makatos

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=5462105A.6020100@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=thanos.makatos@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).