Re: [Qemu-devel] [RFC v6 09/14] softmmu: Add history of excl accesses

2015-12-15 Thread alvise rigo
On Mon, Dec 14, 2015 at 10:35 AM, Paolo Bonzini wrote: > > > On 14/12/2015 09:41, Alvise Rigo wrote: >> +static inline void excl_history_put_addr(CPUState *cpu, hwaddr addr) >> +{ >> +/* Avoid some overhead if the address we are about to put is equal to >> + * the last one */ >> +if (c

Re: [Qemu-devel] [RFC v6 09/14] softmmu: Add history of excl accesses

2015-12-14 Thread Paolo Bonzini
On 14/12/2015 09:41, Alvise Rigo wrote: > +static inline void excl_history_put_addr(CPUState *cpu, hwaddr addr) > +{ > +/* Avoid some overhead if the address we are about to put is equal to > + * the last one */ > +if (cpu->excl_protected_addr[cpu->excl_protected_last] != > +

[Qemu-devel] [RFC v6 09/14] softmmu: Add history of excl accesses

2015-12-14 Thread Alvise Rigo
Add a circular buffer to store the hw addresses used in the last EXCLUSIVE_HISTORY_LEN exclusive accesses. When an address is pop'ed from the buffer, its page will be set as not exclusive. In this way, we avoid: - frequent set/unset of a page (causing frequent flushes as well) - the possibility to