All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"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 09:45:32 +0800	[thread overview]
Message-ID: <20180411014532.GB28698@stefanha-x1.localdomain> (raw)
In-Reply-To: <20180410124913.10832-3-peterx@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 930 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

  parent reply	other threads:[~2018-04-11  1:45 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 [this message]
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
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=20180411014532.GB28698@stefanha-x1.localdomain \
    --to=stefanha@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=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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.