Re: [Qemu-devel] [PATCH v2 1/2] Introduce QLIST_INSERT_HEAD_RCU and dummy RCU wrappers.

2011-10-13 Thread Paolo Bonzini
On 10/13/2011 10:35 PM, Harsh Prateek Bora wrote: +#define QLIST_INSERT_HEAD_RCU(head, elm, field) do {\ +(elm)->field.le_prev =&(head)->lh_first; \ +smp_wmb(); \ +if (((elm)->f

[Qemu-devel] [PATCH v2 1/2] Introduce QLIST_INSERT_HEAD_RCU and dummy RCU wrappers.

2011-10-13 Thread Harsh Prateek Bora
SynthFS needs a QLIST_INSERT_HEAD_RCU to make sure list instructions are not re-ordered and therefore avoiding a crash. There may be parallel readers which should be allowed for lock-free access and this variant allows us to get rid of rwlocks used by readers. SynthFS is a special case where we d