From: David Vrabel <david.vrabel@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Keir Fraser <keir@xen.org>, Tim Deegan <tim@xen.org>,
David Vrabel <david.vrabel@citrix.com>,
Jan Beulich <jbeulich@suse.com>,
Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCHv15 0/2] gnttab: Improve scaleability
Date: Thu, 18 Jun 2015 18:18:31 +0100 [thread overview]
Message-ID: <1434647913-16028-1-git-send-email-david.vrabel@citrix.com> (raw)
Performance results for aggregate intrahost network throughput
(between 20 VM pairs, with 16 dom0 VCPUs) show substantial
improvements.
Throughput/Gbit/s
Base 9.7
Split locks 25.8
Split locks 42.9
+ per-VCPU maptrack lists
v15:
* Alloc maptrack array in grant_table_create().
* Init per-VCPU state when VCPUs are allocated.
* Fix handle check in steal_maptrack_handle.
v14:
* When adding a new frame, use first entry and don't add it to free
list.
* v -> curr, d -> currd and const (where appropriate).
* Use get_random().
* Check for NULL currd->vcpu[i].
v13:
* When adding new frames, update v->maptrack_head last.
* Each VCPU no longer gets a reserved number of frames -- they're
allocated first-come, first-served.
* Use original gt->maptrack_limit (instead of gt->maptrack_pages).
* Steal an extra entry for the sentinel if a VCPU's free list is
unitialized.
v12:
* Check for same refs in __gnttab_swap_grant_ref() to avoid deadlock.
* Assert local grant table lock is held in mapcount().
* Document that maptrack_lock is only for the free list.
* Document locking needed for maptrack entries (the active entry
lock).
* Try and steal maptrack entries if a VCPU runs out (RFC).
v11:
* Fix exists test in gnttab_map_exists().
* Call gnttab_need_iommu_mapping() once for each lock/unlock.
* Take active entry lock in gnttab_transfer().
* Use read_atomic() when checking maptrack flags for validity (note:
all other reads of map->flags are either after it is validated as
stable or protected by the active entry lock and thus don't need
read_atomic()).
* Add comment to double_gt_lock().
* Allocate maptrack array with vzalloc() since it may be >1 page.
v10:
* Reduce scope of act in grant_map_exists().
* Make unlock sequence in error paths consistent in
__acquire_grant_for_copy().
* gnt_unlock_out -> to gt_unlock_out in __acquire_grant_for_copy().
* In gnttab_map_grant_ref(), keep double lock around maptrack update
if gnttab_need_iommu_mapping(). Use a wmb(), otherwise.
* Divide max_maptrack_frames evenly amongst the VCPUs.
* Increase default max_maptrack_frames to compensate.
v9:
* Refactor the locking patches into three commits:
1. Add per-active entry locking.
2. Add maptrack_lock.
3. Make the grant table lock a read-write lock.
* Keep the double lock around IOMMU updates, but adjust their scope
to only the IOMMU updates.
v8:
* Misc locking fixes.
* Use read/write_atomic() in per-VCPU maptrack free list.
* Improve locking docs.
v7:
* Re-add grant table rwlock (locking was broken without it and the
gains are minimal anyway).
* Remove unneeded locks from grant_table_destroy().
* Fix get_maptrack_handle() locking.
v6:
* Remove most uses of the grant table lock.
* Make the grant table lock a spin lock again (there were only
writers left after the above)
* Add per-VCPU maptrack free lists.
v5:
* Addressed locking issue pointed out by Jan Beulich
* Fixed git rebase merge issue introduced in v4
(acquiring locking twice)
* Change for ()-loop in grant_map_exists
* Coding style fixes
v4:
* Coding style nits from Jan Beulich
* Fixup read locks pointed out by Jan Beulich
* renamed double_gt_(un)lock to double_maptrack_(un)lock
per request from Jan Beulich
* Addressed ASSERT()'s from Jan Beulich
* Addressed locking issues in unmap_common pointed out
by Jan Beulich
v3:
* Addressed gnttab_swap_grant_ref() comment from Andrew Cooper
v2:
* Add arm part per request from Julien Grall
David
next reply other threads:[~2015-06-18 17:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-18 17:18 David Vrabel [this message]
2015-06-18 17:18 ` [PATCHv15 1/2] gnttab: use per-VCPU maptrack free lists David Vrabel
2015-06-18 17:18 ` [PATCHv15 2/2] gnttab: steal maptrack entries from other VCPUs David Vrabel
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=1434647913-16028-1-git-send-email-david.vrabel@citrix.com \
--to=david.vrabel@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=tim@xen.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.