xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* passthrough: improve interrupt injection locking
@ 2015-10-23 11:05 David Vrabel
  2015-10-23 11:05 ` [PATCHv1 1/2] passthrough: use per-interrupt lock when injecting an interrupt David Vrabel
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: David Vrabel @ 2015-10-23 11:05 UTC (permalink / raw)
  To: xen-devel; +Cc: David Vrabel, Jan Beulich, Ian Campbell

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.

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-10-30 14:45 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-23 11:05 passthrough: improve interrupt injection locking David Vrabel
2015-10-23 11:05 ` [PATCHv1 1/2] passthrough: use per-interrupt lock when injecting an interrupt David Vrabel
2015-10-27 11:56   ` Jan Beulich
2015-10-28 20:18     ` Konrad Rzeszutek Wilk
2015-10-29  9:11       ` Jan Beulich
2015-10-30 14:45         ` Konrad Rzeszutek Wilk
2015-10-23 11:05 ` [PATCHv1 2/2] passthrough: improve locking when iterating over interrupts bound to VMs David Vrabel
2015-10-27 12:44   ` Jan Beulich
2015-10-27 13:11     ` David Vrabel
2015-10-28 20:42   ` Konrad Rzeszutek Wilk
2015-10-23 12:37 ` passthrough: improve interrupt injection locking Ian Campbell
2015-10-23 12:38   ` David Vrabel
2015-10-23 12:45     ` Ian Campbell

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).