Re: [PATCH v6 3/6] coroutine-lock: Store the coroutine in the CoWaitRecord only once

2021-03-30 Thread Stefan Hajnoczi
On Thu, Mar 25, 2021 at 12:29:38PM +0100, Paolo Bonzini wrote:
> From: David Edmondson 
> 
> 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 
> Reviewed-by: Philippe Mathieu-Daudé 
> Signed-off-by: David Edmondson 
> Message-Id: <20210309144015.557477-4-david.edmond...@oracle.com>
> Signed-off-by: Paolo Bonzini 
> ---
>  util/qemu-coroutine-lock.c | 1 -
>  1 file changed, 1 deletion(-)

Reviewed-by: Stefan Hajnoczi 


signature.asc
Description: PGP signature


[PATCH v6 3/6] coroutine-lock: Store the coroutine in the CoWaitRecord only once

2021-03-25 Thread Paolo Bonzini
From: David Edmondson 

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 
Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: David Edmondson 
Message-Id: <20210309144015.557477-4-david.edmond...@oracle.com>
Signed-off-by: Paolo Bonzini 
---
 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, );
 
 /* This is the "Responsibility Hand-Off" protocol; a lock() picks from
-- 
2.29.2