[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 13/17] coroutine-lock: introduce qe
From: |
Fam Zheng |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH 13/17] coroutine-lock: introduce qemu_co_mutex_lock_unlock |
Date: |
Thu, 4 May 2017 15:39:49 +0800 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Thu, 04/20 14:00, Paolo Bonzini wrote:
> + if (atomic_cmpxchg(&mutex->locked, waiters, waiters + 1) != waiters) {
Is it still useful to try the fast path again if there are now even more
waiters, i.e. "atomic_cmpxchg(...) > waiters"?
> + goto retry_fast_path;
> + }
> +
> + qemu_co_mutex_lock_slowpath(ctx, mutex);
> + qemu_co_mutex_unlock(mutex);
> +}
> +
> void coroutine_fn qemu_co_mutex_unlock(CoMutex *mutex)
> {
> Coroutine *self = qemu_coroutine_self();
> --
> 2.9.3
>
>
>
- Re: [Qemu-block] [Qemu-devel] [PATCH 13/17] coroutine-lock: introduce qemu_co_mutex_lock_unlock,
Fam Zheng <=