On 17 December 2014 at 11:12, Mark Burton <mark.bur...@greensocs.com> wrote: > We were not (yet) trying to fix that, we were simply asking the > question, if we add these mutex’s - do we have any detrimental impact > on anything. > Seems like the answer is that adding the mutex’s is fine - it doesn’t > seem to have a performance impact or anything. Good.
Personally I dislike the mutex approach because it means that every target ends up with its own ad-hoc implementation of something that would be better implemented in the QEMU core support (even if that core support is simply taking mutexes in the end). I also note that the linux-user code for handling exclusives does it by having a region (effectively) where all other CPUs stop executing *anything*. Do we need that? PS: you'll find that we already have some ancient and half-broken support code for the mutex approach (search for 'spinlock_t')... -- PMM