[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread |
Date: |
Wed, 11 Apr 2018 09:45:32 +0800 |
User-agent: |
Mutt/1.9.2 (2017-12-15) |
On Tue, Apr 10, 2018 at 08:49:13PM +0800, Peter Xu wrote:
> cur_mon was only used in main loop so we don't really need that to be
> per-thread variable. Now it's possible that we have more than one
> thread to operate on it. Let's start to let it be per-thread variable.
Trying to understand the reason for this patch:
Are there any users of per-thread cur_mon?
or
Does this patch fix a bug?
> In case we'll create threads within a valid cur_mon setup, we'd better
> let the child threads to inherit the cur_mon from parent thread too. Do
> that for both posix and win32 threads.
Without actual users I don't like this. It sounds like "let's make it
global just in case something needs it some day".
It's ugly for QEMU's thread API to know about the monitor - that's a
layering violation.
If there's a legitimate need I think this patch might be necessary, but
I don't see enough justification to do this yet.
Stefan
signature.asc
Description: PGP signature
- [Qemu-devel] [PATCH 0/2] qemu-thread: allow cur_mon be per thread, Peter Xu, 2018/04/10
- [Qemu-devel] [PATCH 1/2] qemu-thread: always keep the posix wrapper layer, Peter Xu, 2018/04/10
- [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread, Peter Xu, 2018/04/10
- Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread, Eric Blake, 2018/04/10
- Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread,
Stefan Hajnoczi <=
- Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread, Peter Xu, 2018/04/10
- Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread, Paolo Bonzini, 2018/04/11
- Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread, Peter Xu, 2018/04/11
- Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread, Paolo Bonzini, 2018/04/11
- Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread, Peter Xu, 2018/04/11
- Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread, Eric Blake, 2018/04/11
- Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread, Peter Xu, 2018/04/12