All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Johnson <john.g.johnson@oracle.com>
To: Peter Xu <peterx@redhat.com>
Cc: QEMU Devel Mailing List <qemu-devel@nongnu.org>,
	Thanos Makatos <thanos.makatos@nutanix.com>,
	John Levon <john.levon@nutanix.com>,
	Markus Armbruster <armbru@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: Question on memory commit during MR finalize()
Date: Mon, 19 Jul 2021 20:58:44 +0000	[thread overview]
Message-ID: <D22C9D84-EE93-4DA8-99DE-98C46E27809C@oracle.com> (raw)
In-Reply-To: <YPXZkynODtvXXx6c@t490s>



> On Jul 19, 2021, at 12:59 PM, Peter Xu <peterx@redhat.com> wrote:
> 
> 
> Here vfio_user_send_recv() looks tricky to me - it releases the bql within a
> memory update procedure, and IMHO it needs some serious justification on why it
> can do so. For example, what if memory layout changed when waiting for the
> reply?  As it can happen in parallel if without bql, afaict.
> 


	The reason bql is dropped is usually the thread will sleep waiting
for a reply from the server, and I didn't think it was a good idea to block
all threads in the meantime.  Most vfio-user requests result from a guest
action, so just blocking the single CPU thread for the reply is good.

	The vfio-user code doesn’t depend on the memory layout being stable,
it’s just sending the layout updates to the server.  Would it be better to
send memory updates asynchronously, and wait for all the replies in the commit
callback?

								JJ



  reply	other threads:[~2021-07-19 21:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20 21:00 Question on memory commit during MR finalize() Peter Xu
2020-04-20 21:44 ` Paolo Bonzini
2020-04-20 23:31   ` Peter Xu
2020-04-21  9:43     ` Paolo Bonzini
2020-04-21 10:43       ` Peter Xu
2021-07-15 14:27         ` Thanos Makatos
2021-07-15 18:35           ` Peter Xu
2021-07-16 11:42             ` Thanos Makatos
2021-07-16 14:18               ` Peter Xu
2021-07-19 14:38                 ` Thanos Makatos
2021-07-19 15:56                   ` Peter Xu
2021-07-19 18:02                     ` Thanos Makatos
2021-07-19 19:05                       ` Thanos Makatos
2021-07-19 19:59                         ` Peter Xu
2021-07-19 20:58                           ` John Johnson [this message]
2021-07-20  1:22                             ` 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=D22C9D84-EE93-4DA8-99DE-98C46E27809C@oracle.com \
    --to=john.g.johnson@oracle.com \
    --cc=armbru@redhat.com \
    --cc=john.levon@nutanix.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thanos.makatos@nutanix.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.