Commit Graph
5 Commits
Author SHA1 Message Date
David Vrabel 40de9fffb4 gnttab: make the grant table lock a read-write lock
In combination with the per-active entry locks, the grant table lock
can be made a read-write lock since the majority of cases only the
read lock is required. The grant table read lock protects against
changes to the table version or size (which are done with the write
lock held).

The write lock is also required when two active entries must be
acquired.

The double lock is still required when updating IOMMU page tables.

With the lock contention being only on the maptrack lock (unless IOMMU
updates are required), performance and scalability is improved.

Based on a patch originally by Matt Wilson <msw@amazon.com>.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2015-06-15 13:25:20 +02:00
David Vrabel 5a9899ddc4 gnttab: introduce maptrack lock
Split grant table lock into two separate locks. One to protect
maptrack free list (maptrack_lock) and one for everything else (lock).

Based on a patch originally by Matt Wilson <msw@amazon.com>.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2015-06-15 13:23:34 +02:00
David Vrabel b4650e9a96 gnttab: per-active entry locking
Introduce a per-active entry spin lock to protect active entry state
The grant table lock must be locked before acquiring (locking) an
active entry.

This is a step in reducing contention on the grant table lock, but
will only do so once the grant table lock is turned into a read-write
lock.

Based on a patch originally by Matt Wilson <msw@amazon.com>.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2015-06-15 13:22:07 +02:00
cwc22@centipede.cl.cam.ac.uk 691f7f4e58 bitkeeper revision 1.1344 (4266a1eeiNiXbU4vcENZiEEaX7Iybw)
grant-tables.txt:
  fix to error check condition after map
blkback.c:
  bug fix to grant table code in block backend
Kconfig:
  amend config entry for XEN_BLKDEV_GRANT
2005-04-20 18:39:42 +00:00
cwc22@centipede.cl.cam.ac.uk d2781af07b bitkeeper revision 1.1236.56.1 (4251a1f9OIyZY2I2LqBlxl0mi64FkA)
Grant tables: substantially more robust.
Block front and back drivers: support for using grant tables for interdomain communication.
2005-04-04 20:22:17 +00:00