Re: [Qemu-devel] [RFC 0/7] Safe watch and breakpoint manipulation

2016-06-20 Thread Sergey Fedorov
On 20/06/16 19:08, Paolo Bonzini wrote: >>> The patch series changes things in stages. >>> >>> First we move the break/watchpoints into an array which is more >>> amenable to RCU control that the QLIST. We then control the life time >>> of references to break/watchpoint data by removing long held >

Re: [Qemu-devel] [RFC 0/7] Safe watch and breakpoint manipulation

2016-06-20 Thread Sergey Fedorov
On 20/06/16 19:27, Alex Bennée wrote: > The watchpoint contention is the biggest one. FWIW I like the RCU > approach because it is low impact when running (and I'm hoping faster as > well by not being a linked list). When can we expect any contention? I generally find the idea of RCU really great,

Re: [Qemu-devel] [RFC 0/7] Safe watch and breakpoint manipulation

2016-06-20 Thread Alex Bennée
Paolo Bonzini writes: >> > The patch series changes things in stages. >> > >> > First we move the break/watchpoints into an array which is more >> > amenable to RCU control that the QLIST. We then control the life time >> > of references to break/watchpoint data by removing long held >> > refere

Re: [Qemu-devel] [RFC 0/7] Safe watch and breakpoint manipulation

2016-06-20 Thread Paolo Bonzini
> > The patch series changes things in stages. > > > > First we move the break/watchpoints into an array which is more > > amenable to RCU control that the QLIST. We then control the life time > > of references to break/watchpoint data by removing long held > > references in the target code and get

Re: [Qemu-devel] [RFC 0/7] Safe watch and breakpoint manipulation

2016-06-20 Thread Sergey Fedorov
On 17/06/16 19:33, Alex Bennée wrote: > Last time I went through the MTTCG code the access to the > break/watchpoint code was annotated with "RCU?". The code currently > gets away with avoiding locks for the gdbstub as the guest execution > state is usually halted. However when used for modelling a

Re: [Qemu-devel] [RFC 0/7] Safe watch and breakpoint manipulation

2016-06-20 Thread Sergey Fedorov
On 20/06/16 17:25, Paolo Bonzini wrote: > > On 20/06/2016 15:55, Sergey Fedorov wrote: I'm not sure why you say that arrays are more amenable than QTAILQ (though indeed include/qemu/rcu_queue.h only includes QLIST for now), but I feel bad asking you to redo all the work... >> Is ther

Re: [Qemu-devel] [RFC 0/7] Safe watch and breakpoint manipulation

2016-06-20 Thread Paolo Bonzini
On 20/06/2016 15:55, Sergey Fedorov wrote: >> > I'm not sure why you say that arrays are more amenable than QTAILQ >> > (though indeed include/qemu/rcu_queue.h only includes QLIST for now), >> > but I feel bad asking you to redo all the work... > Is there any realistic way to manage *doubly* link

Re: [Qemu-devel] [RFC 0/7] Safe watch and breakpoint manipulation

2016-06-20 Thread Sergey Fedorov
On 17/06/16 20:01, Paolo Bonzini wrote: > > On 17/06/2016 18:33, Alex Bennée wrote: >> First we move the break/watchpoints into an array which is more >> amenable to RCU control that the QLIST. We then control the life time >> of references to break/watchpoint data by removing long held >> referenc

Re: [Qemu-devel] [RFC 0/7] Safe watch and breakpoint manipulation

2016-06-17 Thread Paolo Bonzini
On 17/06/2016 18:33, Alex Bennée wrote: > First we move the break/watchpoints into an array which is more > amenable to RCU control that the QLIST. We then control the life time > of references to break/watchpoint data by removing long held > references in the target code and getting information

[Qemu-devel] [RFC 0/7] Safe watch and breakpoint manipulation

2016-06-17 Thread Alex Bennée
Hi, Last time I went through the MTTCG code the access to the break/watchpoint code was annotated with "RCU?". The code currently gets away with avoiding locks for the gdbstub as the guest execution state is usually halted. However when used for modelling architectural debug registers there is no