From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCH] introduce grant copy for user land Date: Tue, 11 Nov 2014 13:34:18 +0000 Message-ID: <5462105A.6020100@citrix.com> References: <1412262916-22596-1-git-send-email-thanos.makatos@citrix.com> <5457C35F.50504@citrix.com> <2368A3FCF9F7214298E53C823B0A48EC04289299@AMSPEX01CL02.citrite.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XoBaQ-0001E3-Tw for xen-devel@lists.xenproject.org; Tue, 11 Nov 2014 13:34:23 +0000 In-Reply-To: <2368A3FCF9F7214298E53C823B0A48EC04289299@AMSPEX01CL02.citrite.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Thanos Makatos , "xen-devel@lists.xenproject.org" Cc: "boris.ostrovsky@oracle.com" List-Id: xen-devel@lists.xenproject.org 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