Re: [Qemu-devel] [PATCH 9/9] Convert ram_list to RCU

2015-02-11 Thread Paolo Bonzini
On 11/02/2015 09:47, Fam Zheng wrote: >> > +rcu_read_lock(); >> > +block = atomic_rcu_read(&ram_list.mru_block); >> > if (block && block->host && host - block->host < block->max_length) { >> > goto found; >> > } >> > >> > -QLIST_FOREACH(block, &ram_list.blocks, ne

Re: [Qemu-devel] [PATCH 9/9] Convert ram_list to RCU

2015-02-11 Thread Fam Zheng
On Fri, 02/06 17:55, Paolo Bonzini wrote: > From: Mike Day > > Allow "unlocked" reads of the ram_list by using an RCU-enabled QLIST. > > The ramlist mutex is kept, because call_rcu callbacks are not run within > the iothread lock. Thus, writers still need to take the ramlist mutex, > but they n

[Qemu-devel] [PATCH 9/9] Convert ram_list to RCU

2015-02-06 Thread Paolo Bonzini
From: Mike Day Allow "unlocked" reads of the ram_list by using an RCU-enabled QLIST. The ramlist mutex is kept, because call_rcu callbacks are not run within the iothread lock. Thus, writers still need to take the ramlist mutex, but they no longer need to assume that the iothread lock is taken.

[Qemu-devel] [PATCH 9/9] Convert ram_list to RCU

2015-02-03 Thread Paolo Bonzini
From: Mike Day Allow "unlocked" reads of the ram_list by using an RCU-enabled QLIST. The ramlist mutex is kept, because call_rcu callbacks are not run within the iothread lock. Thus, writers still need to take the ramlist mutex, but they no longer need to assume that the iothread lock is taken.