[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL for-6.0 3/6] coroutine-lock: Store the coroutine in the CoWaitReco
From: |
Stefan Hajnoczi |
Subject: |
[PULL for-6.0 3/6] coroutine-lock: Store the coroutine in the CoWaitRecord only once |
Date: |
Wed, 31 Mar 2021 10:50:56 +0100 |
From: David Edmondson <david.edmondson@oracle.com>
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.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: David Edmondson <david.edmondson@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 20210325112941.365238-4-pbonzini@redhat.com
Message-Id: <20210309144015.557477-4-david.edmondson@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.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.2
- [PULL for-6.0 0/6] Block patches, Stefan Hajnoczi, 2021/03/31
- [PULL for-6.0 1/6] block/vdi: When writing new bmap entry fails, don't leak the buffer, Stefan Hajnoczi, 2021/03/31
- [PULL for-6.0 2/6] block/vdi: Don't assume that blocks are larger than VdiHeader, Stefan Hajnoczi, 2021/03/31
- [PULL for-6.0 3/6] coroutine-lock: Store the coroutine in the CoWaitRecord only once,
Stefan Hajnoczi <=
- [PULL for-6.0 4/6] coroutine-lock: Reimplement CoRwlock to fix downgrade bug, Stefan Hajnoczi, 2021/03/31
- [PULL for-6.0 5/6] test-coroutine: Add rwlock upgrade test, Stefan Hajnoczi, 2021/03/31
- [PULL for-6.0 6/6] test-coroutine: Add rwlock downgrade test, Stefan Hajnoczi, 2021/03/31