]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm tools: Add a brlock
authorSasha Levin <levinsasha928@gmail.com>
Mon, 30 May 2011 17:27:55 +0000 (20:27 +0300)
committerPekka Enberg <penberg@kernel.org>
Thu, 2 Jun 2011 08:38:00 +0000 (11:38 +0300)
commitb2604398c296be2c3c8157d144b2ee0b62491240
tree3d607fa66fec984dc21596a0f00735f6dffaf90d
parent1c5ee6cab07829f0ed9adf70b7fccb0b0dc7423a
kvm tools: Add a brlock

brlock is a lock which is very cheap for reads, but very expensive
for writes.
This lock will be used when updates are very rare and reads are
common.
This lock is currently implemented by stopping the guest while
performing the updates. We assume that the only threads which
read from the locked data are VCPU threads, and the only writer
isn't a VCPU thread.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/include/kvm/brlock.h [new file with mode: 0644]