From: Tim Deegan Subject: Re: [PATCH 3/3] grant-table: defer releasing pages acquired in a grant copy Date: Thu, 22 Jan 2015 17:33:54 +0100 Message-ID: <20150122163354.GQ97314@deinos.phlegethon.org> References: <1421777990-1122-1-git-send-email-david.vrabel@citrix.com> <1421777990-1122-4-git-send-email-david.vrabel@citrix.com> 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 1YEKhj-0008Fm-8d for xen-devel@lists.xenproject.org; Thu, 22 Jan 2015 16:33:59 +0000 Content-Disposition: inline In-Reply-To: <1421777990-1122-4-git-send-email-david.vrabel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel Cc: xen-devel@lists.xenproject.org, Keir Fraser , Ian Campbell , Jan Beulich List-Id: xen-devel@lists.xenproject.org At 18:19 +0000 on 20 Jan (1421774389), David Vrabel wrote: > Acquiring a page for the source or destination of a grant copy is an > expensive operation. A common use case is for two adjacent grant copy > ops to operate on either the same source or the same destination page. > > Instead of always acquiring and releasing destination and source pages > for each operation, release the page once it is no longer valid for > the next op. > > If either the source or destination domains changes both pages are > released as it is unlikely that either will still be valid. > > XenServer's performance benchmarks show modest improvements in network > receive throughput (netback uses grant copy in the guest Rx path) and > no regressions in disk performamnce (using tapdisk3 which grant copies > as the backend). > > Baseline Deferred Release > Interhost receive to VM 7.2 Gb/s ~9 Gbit/s > Interhost aggregate 24 Gb/s 28 Gb/s > Intrahost single stream 14 Gb/s 14 Gb/s > Intrahost aggregate 34 Gb/s 36 Gb/s > Aggregate disk write 900 MB/s 900 MB/s > Aggregate disk read 890 MB/s 890 MB/s > > Signed-off-by: David Vrabel Reviewed-by: Tim Deegan Though if you're doing a v3... > for ( i = 0; i < count; i++ ) > { > if (i && hypercall_preempt_check()) while you're here, you could add the missing spaces to this if ( ). Cheers, Tim.