Re: [PATCH 3/4] kvm tools: Add a brlock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Sasha Levin <levinsasha928@xxxxxxxxx> wrote:

> +++ b/tools/kvm/include/kvm/brlock.h
> @@ -0,0 +1,12 @@
> +#ifndef KVM__BRLOCK_H
> +#define KVM__BRLOCK_H
> +
> +#include "kvm/kvm.h"
> +#include "kvm/barrier.h"
> +
> +#define br_read_lock()		mb()
> +#define br_read_unlock()	mb()

These only need to be compiler barrier()s AFAICS, because the 'pause' 
op will signal back to the requestor thread - which whole operation 
is a barrier to begin with.

> +#define br_write_lock()		kvm__pause()
> +#define br_write_unlock()	kvm__continue()
> +#endif

Btw., it might make sense to add a comment to this header file, 
explaining what a 'big reader lock' is :-)

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux