Re: Question on memory commit during MR finalize()

2021-07-19 Thread Peter Xu
On Mon, Jul 19, 2021 at 08:58:44PM +, John Johnson wrote: > > > > On Jul 19, 2021, at 12:59 PM, Peter Xu 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

Re: Question on memory commit during MR finalize()

2021-07-19 Thread John Johnson
> On Jul 19, 2021, at 12:59 PM, Peter Xu 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

Re: Question on memory commit during MR finalize()

2021-07-19 Thread Peter Xu
c: Paolo Bonzini ; John Levon > > ; John G Johnson ; > > Markus Armbruster ; QEMU Devel Mailing List > > > > Subject: Re: Question on memory commit during MR finalize() > > > > Omg I don't know how I missed that, of course I'll ignore SIGUSR1 and > > rete

RE: Question on memory commit during MR finalize()

2021-07-19 Thread Thanos Makatos
1, 16:58 > To: Thanos Makatos > Cc: Paolo Bonzini; Markus Armbruster; QEMU Devel Mailing List; John Levon; > John G Johnson > Subject: Re: Question on memory commit during MR finalize() > > > Hi, Thanos, > > On Mon, Jul 19, 2021 at 02:38:52PM +, Thanos Makatos wrote: &g

Re: Question on memory commit during MR finalize()

2021-07-19 Thread Thanos Makatos
on memory commit during MR finalize() Hi, Thanos, On Mon, Jul 19, 2021 at 02:38:52PM +, Thanos Makatos wrote: > I can trivially trigger an assertion with a build where I merged the recent > vfio-user patches > (https://urldefense.proofpoint.com/v2/url?u=https-3A__patchew.org_Q

Re: Question on memory commit during MR finalize()

2021-07-19 Thread Peter Xu
Hi, Thanos, On Mon, Jul 19, 2021 at 02:38:52PM +, Thanos Makatos wrote: > I can trivially trigger an assertion with a build where I merged the recent > vfio-user patches > (https://patchew.org/QEMU/cover.1626675354.git.elena.ufimts...@oracle.com/) > to master and then merging the result

RE: Question on memory commit during MR finalize()

2021-07-19 Thread Thanos Makatos
> -Original Message- > From: Peter Xu > Sent: 16 July 2021 15:19 > To: Thanos Makatos > Cc: Paolo Bonzini ; Markus Armbruster > ; QEMU Devel Mailing List de...@nongnu.org>; John Levon ; John G > Johnson > Subject: Re: Question on memory commit during MR fin

Re: Question on memory commit during MR finalize()

2021-07-16 Thread Peter Xu
u.org>; John Levon ; John G > > Johnson > > Subject: Re: Question on memory commit during MR finalize() > > > > On Thu, Jul 15, 2021 at 02:27:48PM +, Thanos Makatos wrote: > > > Hi Peter, > > > > Hi, Thanos, > > > > > We're hitting t

RE: Question on memory commit during MR finalize()

2021-07-16 Thread Thanos Makatos
> -Original Message- > From: Peter Xu > Sent: 15 July 2021 19:35 > To: Thanos Makatos > Cc: Paolo Bonzini ; Markus Armbruster > ; QEMU Devel Mailing List de...@nongnu.org>; John Levon ; John G > Johnson > Subject: Re: Question on memory commit during MR fin

Re: Question on memory commit during MR finalize()

2021-07-15 Thread Peter Xu
On Thu, Jul 15, 2021 at 02:27:48PM +, Thanos Makatos wrote: > Hi Peter, Hi, Thanos, > We're hitting this issue using a QEMU branch where JJ is using vfio-user as > the transport for multiprocess-qemu > (https://github.com/oracle/qemu/issues/9). We can reproduce it fairly > reliably by

RE: Question on memory commit during MR finalize()

2021-07-15 Thread Thanos Makatos
Hi Peter, > -Original Message- > From: Qemu-devel bounces+thanos.makatos=nutanix@nongnu.org> On Behalf Of Peter > Xu > Sent: 21 April 2020 11:44 > To: Paolo Bonzini > Cc: Markus Armbruster ; QEMU Devel Mailing List > > Subject: Re: Question on memor

Re: Question on memory commit during MR finalize()

2020-04-21 Thread Peter Xu
On Tue, Apr 21, 2020 at 11:43:36AM +0200, Paolo Bonzini wrote: > On 21/04/20 01:31, Peter Xu wrote: > >> > >> However, instead of memory_region_transaction_commit, > >> memory_region_finalize probably should do something like > >> > >> --memory_region_transaction_depth; > >> assert

Re: Question on memory commit during MR finalize()

2020-04-21 Thread Paolo Bonzini
On 21/04/20 01:31, Peter Xu wrote: >> >> However, instead of memory_region_transaction_commit, >> memory_region_finalize probably should do something like >> >> --memory_region_transaction_depth; >> assert (memory_region_transaction_depth || >> (!memory_region_update_pending && >>

Re: Question on memory commit during MR finalize()

2020-04-20 Thread Peter Xu
On Mon, Apr 20, 2020 at 11:44:11PM +0200, Paolo Bonzini wrote: > On 20/04/20 23:00, Peter Xu wrote: > > > > I'm still uncertain how the dirty ring branch can easily trigger this, > > however > > the backtrace looks really odd to me in that we're going to do memory commit > > and even sending KVM

Re: Question on memory commit during MR finalize()

2020-04-20 Thread Paolo Bonzini
On 20/04/20 23:00, Peter Xu wrote: > > I'm still uncertain how the dirty ring branch can easily trigger this, however > the backtrace looks really odd to me in that we're going to do memory commit > and even sending KVM ioctls during finalize(), especially in the RCU thread... > I never expected