qemu-devel
[Top][All Lists]
Advanced

[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: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread
Date: Wed, 11 Apr 2018 11:23:57 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 11/04/2018 05:49, Peter Xu wrote:
> On Wed, Apr 11, 2018 at 09:45:32AM +0800, Stefan Hajnoczi wrote:
>> 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?
> 
> Currently no.  But if considering future OOB-capable commands, they
> will modify cur_mon in monitor IOThread at least.

That's fine, but it shouldn't need the inheritance part.  The monitor
IOThread can set cur_mon when it starts.

In general, relying on cur_mon should be avoided.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]