Re: [Qemu-devel] [PATCH 08/10] tcg: add memory barriers in page_find_alloc accesses

2015-08-28 Thread Paolo Bonzini
On 28/08/2015 17:40, Peter Maydell wrote: > Don't we also need to use an atomic_rcu_read() for the load > pd = *lp; > (which is between hunk 1 and 2 in this patch) ? Yes. Paolo

Re: [Qemu-devel] [PATCH 08/10] tcg: add memory barriers in page_find_alloc accesses

2015-08-28 Thread Peter Maydell
On 12 August 2015 at 17:41, Paolo Bonzini wrote: > page_find is reading the radix tree outside all locks, so it has to > use the RCU primitives. It does not need RCU critical sections > because the PageDescs are never removed, so there is never a need > to wait for the end of code sections that u

Re: [Qemu-devel] [PATCH 08/10] tcg: add memory barriers in page_find_alloc accesses

2015-08-13 Thread Emilio G. Cota
On Thu, Aug 13, 2015 at 10:13:32 +0200, Paolo Bonzini wrote: > On 12/08/2015 22:37, Emilio G. Cota wrote: > > > page_find is reading the radix tree outside all locks, so it has to > > > use the RCU primitives. It does not need RCU critical sections > > > because the PageDescs are never removed, so

Re: [Qemu-devel] [PATCH 08/10] tcg: add memory barriers in page_find_alloc accesses

2015-08-13 Thread Paolo Bonzini
On 12/08/2015 22:37, Emilio G. Cota wrote: > > page_find is reading the radix tree outside all locks, so it has to > > use the RCU primitives. It does not need RCU critical sections > > because the PageDescs are never removed, so there is never a need > > to wait for the end of code sections tha

Re: [Qemu-devel] [PATCH 08/10] tcg: add memory barriers in page_find_alloc accesses

2015-08-12 Thread Emilio G. Cota
On Wed, Aug 12, 2015 at 18:41:00 +0200, Paolo Bonzini wrote: > page_find is reading the radix tree outside all locks, so it has to > use the RCU primitives. It does not need RCU critical sections > because the PageDescs are never removed, so there is never a need > to wait for the end of code sect

[Qemu-devel] [PATCH 08/10] tcg: add memory barriers in page_find_alloc accesses

2015-08-12 Thread Paolo Bonzini
page_find is reading the radix tree outside all locks, so it has to use the RCU primitives. It does not need RCU critical sections because the PageDescs are never removed, so there is never a need to wait for the end of code sections that use a PageDesc. Signed-off-by: Paolo Bonzini --- transla