From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: passthrough: improve interrupt injection locking Date: Fri, 23 Oct 2015 13:37:25 +0100 Message-ID: <1445603845.2374.140.camel@citrix.com> References: <1445598322-22154-1-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 1Zpbeg-0004Gq-US for xen-devel@lists.xenproject.org; Fri, 23 Oct 2015 12:41:11 +0000 In-Reply-To: <1445598322-22154-1-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 , xen-devel@lists.xenproject.org Cc: Jan Beulich List-Id: xen-devel@lists.xenproject.org On Fri, 2015-10-23 at 12:05 +0100, David Vrabel wrote: > When injecting an interrupt for a passthrough device into a guest, the > per-domain event_lock is held, reducing performance when a guest has > many VCPUs and high interrupt rates. Did you CC me due to a possible impact on ARM? If so then I think since ARM lacks this "dpci" stuff none of these changes should have any impact on that arch. If you think I've missed something or you CCd me for some other reason please let me know. Thanks, Ian. > > By using a per-interrupt lock in the hot paths, this contention is > eliminated and performance improves (a bit). > > For testing, a 32 VCPU guest with an NVME device assigned to it was > used. Continual reads with small (512 B) blocks were performed on all > 32 hardware queues simultaneously. > > * Lock profiling: > > Before (elapsed: 60 s): > > (XEN) [ 3321.143155] Domain 1 event_lock: > (XEN) [ 3321.143158] lock: 14411627(00000005:90714AEF), > block: 6658599(00000003:709F82BD) > > After (elapsed: 60 s): > > (XEN) [ 1253.921427] Domain 2 event_lock: > (XEN) [ 1253.921429] lock: 8287(00000000:01AE517C), > block: 67(00000000:000D4C3A) > > * Aggregate performance: > > MB/s > Before 60.8 > After 68.4 > > David >