qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Fiona Ebner <f.ebner@proxmox.com>,
	 Paolo Bonzini <pbonzini@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	 QEMU Developers <qemu-devel@nongnu.org>,
	 "open list:Block layer core" <qemu-block@nongnu.org>,
	 Michael Roth <michael.roth@amd.com>,  Fam Zheng <fam@euphon.net>,
	 Stefan Hajnoczi <stefanha@redhat.com>,
	 Thomas Lamprecht <t.lamprecht@proxmox.com>,
	 Peter Xu <peterx@redhat.com>
Subject: Re: QMP (without OOB) function running in thread different from the main thread as part of aio_poll
Date: Fri, 28 Apr 2023 10:38:31 +0200	[thread overview]
Message-ID: <87354kbdvc.fsf@secure.mitica> (raw)
In-Reply-To: <ZEuEIhe86udi38kx@redhat.com> (Kevin Wolf's message of "Fri, 28 Apr 2023 10:30:26 +0200")

Kevin Wolf <kwolf@redhat.com> wrote:

>> 
>> I am perhaps a bit ingenuous here, but it is there a way to convince
>> qemu that snapshot_save_job_bh *HAS* to run on the main thread?
>
> I believe we're talking about a technicality here. I asked another more
> fundamental question that nobody has answered yet:
>
> Why do you think that it's ok to call bdrv_writev_vmstate() without
> holding the BQL?

I will say this function starts by bdrv_ (i.e. block layer people) and
endes with _vmstate (i.e. migration people).

To be honest, I don't know.  That is why I _supposed_ you have an idea.

> Because if we come to the conclusion that it's not ok (which is what I
> think), then it doesn't matter whether we violate the condition in the
> main thread or a vcpu thread. It's wrong in both cases, just the failure
> mode differs - one crashes spectacularly with an assertion failure, the
> other has a race condition. Moving from the assertion failure to a race
> condition is not a proper fix.

Fully agree there.  Just that I don't know the answer.

Later, Juan.



  reply	other threads:[~2023-04-28  8:38 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-19 14:09 QMP (without OOB) function running in thread different from the main thread as part of aio_poll Fiona Ebner
2023-04-19 16:59 ` Paolo Bonzini
2023-04-20  6:11 ` Markus Armbruster
2023-04-20  6:55   ` Paolo Bonzini
2023-04-26 14:31     ` Fiona Ebner
2023-04-27 11:03       ` Kevin Wolf
2023-04-27 12:27         ` Fiona Ebner
2023-04-27 14:36           ` Juan Quintela
2023-04-27 14:56             ` Peter Xu
2023-04-28  7:53               ` Fiona Ebner
2023-04-28  7:23             ` Fiona Ebner
2023-04-28  7:47               ` Juan Quintela
2023-04-28  8:30                 ` Kevin Wolf
2023-04-28  8:38                   ` Juan Quintela [this message]
2023-04-28 12:22                     ` Kevin Wolf
2023-04-28 16:54                       ` Juan Quintela
2023-05-02 10:03                         ` Fiona Ebner
2023-05-02 10:25                           ` Fiona Ebner
2023-05-02 10:35                             ` Juan Quintela
2023-05-02 12:49                               ` Fiona Ebner
2023-05-02 10:30                           ` Juan Quintela

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=87354kbdvc.fsf@secure.mitica \
    --to=quintela@redhat.com \
    --cc=armbru@redhat.com \
    --cc=f.ebner@proxmox.com \
    --cc=fam@euphon.net \
    --cc=kwolf@redhat.com \
    --cc=michael.roth@amd.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=t.lamprecht@proxmox.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).