[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 3/4] coroutine/mutex: Store the coroutine in the CoWaitRecord
From: |
David Edmondson |
Subject: |
[RFC PATCH 3/4] coroutine/mutex: Store the coroutine in the CoWaitRecord only once |
Date: |
Tue, 9 Mar 2021 10:21:56 +0000 |
When taking the slow path for mutex acquisition, set the coroutine
value in the CoWaitRecord in push_waiter(), rather than both there and
in the caller.
Signed-off-by: David Edmondson <david.edmondson@oracle.com>
---
util/qemu-coroutine-lock.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/util/qemu-coroutine-lock.c b/util/qemu-coroutine-lock.c
index 5816bf8900..eb73cf11dc 100644
--- a/util/qemu-coroutine-lock.c
+++ b/util/qemu-coroutine-lock.c
@@ -204,7 +204,6 @@ static void coroutine_fn
qemu_co_mutex_lock_slowpath(AioContext *ctx,
unsigned old_handoff;
trace_qemu_co_mutex_lock_entry(mutex, self);
- w.co = self;
push_waiter(mutex, &w);
/* This is the "Responsibility Hand-Off" protocol; a lock() picks from
--
2.30.1
[RFC PATCH 4/4] coroutine/rwlock: Wake writers in preference to readers, David Edmondson, 2021/03/09