[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question on memory commit during MR finalize()

From: John Johnson
Subject: Re: Question on memory commit during MR finalize()
Date: Mon, 19 Jul 2021 20:58:44 +0000

> 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


reply via email to

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