All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Stefan Hajnoczi" <stefanha@redhat.com>,
	qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>,
	"Fam Zheng" <famz@redhat.com>, "Eric Blake" <eblake@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Dr . David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread
Date: Wed, 11 Apr 2018 17:48:12 +0800	[thread overview]
Message-ID: <20180411094812.GI13887@xz-mi> (raw)
In-Reply-To: <4183b7d5-83c5-5401-3ac4-937bb40a14e8@redhat.com>

On Wed, Apr 11, 2018 at 11:38:58AM +0200, Paolo Bonzini wrote:
> On 11/04/2018 11:35, Peter Xu wrote:
> > Yeah, the inheritance will only make sure cur_mon be initialized
> > always with correct value just like when we are without Out-Of-Band.
> > For example, it's still possible a thread is created within a QMP
> > handler.  If without current change, the cur_mon in the new thread
> > would be NULL.
> > 
> > AFAIU even if cur_mon==NULL we should mostly be fine (e.g.,
> > error_vprintf will handle that case well).  If any of you can help me
> > confirm this, then I agree that this patch is not really needed.
> 
> Yes, though the solution is to not use error_vprintf from auxiliary
> threads. :)  Just make sure all the communication happens through a
> struct that's passed in the thread entry point, and possibly bottom
> halves from the auxiliary thread to the monitor iothread.

Okay. :) Thanks for confirming.  Then let me repost this patch without
touching the qemu-threads.

Btw, do you want me to repost the first patch separately too, or keep
the code as is?  I believe it depends on whether you treat that one as
a cleanup or not.  Thanks,

-- 
Peter Xu

  reply	other threads:[~2018-04-11  9:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-10 12:49 [Qemu-devel] [PATCH 0/2] qemu-thread: allow cur_mon be per thread Peter Xu
2018-04-10 12:49 ` [Qemu-devel] [PATCH 1/2] qemu-thread: always keep the posix wrapper layer Peter Xu
2018-04-10 13:35   ` Eric Blake
2018-04-11  3:18     ` Peter Xu
2018-04-10 12:49 ` [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread Peter Xu
2018-04-10 13:54   ` Eric Blake
2018-04-11  3:31     ` Peter Xu
2018-04-11  1:45   ` Stefan Hajnoczi
2018-04-11  3:49     ` Peter Xu
2018-04-11  9:23       ` Paolo Bonzini
2018-04-11  9:35         ` Peter Xu
2018-04-11  9:38           ` Paolo Bonzini
2018-04-11  9:48             ` Peter Xu [this message]
2018-04-11 13:06               ` Eric Blake
2018-04-12  5:24                 ` Peter Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180411094812.GI13887@xz-mi \
    --to=peterx@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=famz@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.