Re: [RFC PATCH 0/6] job: replace AioContext lock with job_mutex

2021-07-19 Thread Kevin Wolf
Am 19.07.2021 um 11:29 hat Stefan Hajnoczi geschrieben: > On Fri, Jul 16, 2021 at 05:23:50PM +0200, Kevin Wolf wrote: > > Am 13.07.2021 um 15:10 hat Stefan Hajnoczi geschrieben: > > > AIO_WAIT_WHILE() requires that AioContext is acquired according to its > > > documentation, but I'm not sure

Re: [RFC PATCH 0/6] job: replace AioContext lock with job_mutex

2021-07-19 Thread Stefan Hajnoczi
On Fri, Jul 16, 2021 at 05:23:50PM +0200, Kevin Wolf wrote: > Am 13.07.2021 um 15:10 hat Stefan Hajnoczi geschrieben: > > AIO_WAIT_WHILE() requires that AioContext is acquired according to its > > documentation, but I'm not sure that's true anymore. Thread-safe/atomic > > primitives are used by

Re: [RFC PATCH 0/6] job: replace AioContext lock with job_mutex

2021-07-16 Thread Kevin Wolf
Am 13.07.2021 um 15:10 hat Stefan Hajnoczi geschrieben: > AIO_WAIT_WHILE() requires that AioContext is acquired according to its > documentation, but I'm not sure that's true anymore. Thread-safe/atomic > primitives are used by AIO_WAIT_WHILE(), so as long as the condition > being waited for is

Re: [RFC PATCH 0/6] job: replace AioContext lock with job_mutex

2021-07-15 Thread Stefan Hajnoczi
On Thu, Jul 15, 2021 at 03:35:37PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 13.07.2021 19:38, Stefan Hajnoczi wrote: > > On Tue, Jul 13, 2021 at 06:18:39PM +0300, Vladimir Sementsov-Ogievskiy > > wrote: > > > 13.07.2021 16:10, Stefan Hajnoczi wrote: > > > > On Mon, Jul 12, 2021 at 10:41:46AM

Re: [RFC PATCH 0/6] job: replace AioContext lock with job_mutex

2021-07-15 Thread Vladimir Sementsov-Ogievskiy
13.07.2021 19:38, Stefan Hajnoczi wrote: On Tue, Jul 13, 2021 at 06:18:39PM +0300, Vladimir Sementsov-Ogievskiy wrote: 13.07.2021 16:10, Stefan Hajnoczi wrote: On Mon, Jul 12, 2021 at 10:41:46AM +0200, Emanuele Giuseppe Esposito wrote: On 08/07/2021 15:04, Stefan Hajnoczi wrote: On Thu,

Re: [RFC PATCH 0/6] job: replace AioContext lock with job_mutex

2021-07-13 Thread Stefan Hajnoczi
On Tue, Jul 13, 2021 at 06:18:39PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 13.07.2021 16:10, Stefan Hajnoczi wrote: > > On Mon, Jul 12, 2021 at 10:41:46AM +0200, Emanuele Giuseppe Esposito wrote: > > > > > > > > > On 08/07/2021 15:04, Stefan Hajnoczi wrote: > > > > On Thu, Jul 08, 2021 at

Re: [RFC PATCH 0/6] job: replace AioContext lock with job_mutex

2021-07-13 Thread Vladimir Sementsov-Ogievskiy
13.07.2021 16:10, Stefan Hajnoczi wrote: On Mon, Jul 12, 2021 at 10:41:46AM +0200, Emanuele Giuseppe Esposito wrote: On 08/07/2021 15:04, Stefan Hajnoczi wrote: On Thu, Jul 08, 2021 at 01:32:12PM +0200, Paolo Bonzini wrote: On 08/07/21 12:36, Stefan Hajnoczi wrote: What is very clear from

Re: [RFC PATCH 0/6] job: replace AioContext lock with job_mutex

2021-07-13 Thread Stefan Hajnoczi
On Mon, Jul 12, 2021 at 10:42:47AM +0200, Emanuele Giuseppe Esposito wrote: > On 08/07/2021 15:09, Stefan Hajnoczi wrote: > > On Wed, Jul 07, 2021 at 06:58:07PM +0200, Emanuele Giuseppe Esposito wrote: > > > This is a continuation on the work to reduce (and possibly get rid of) > > > the usage of

Re: [RFC PATCH 0/6] job: replace AioContext lock with job_mutex

2021-07-13 Thread Stefan Hajnoczi
On Mon, Jul 12, 2021 at 10:41:46AM +0200, Emanuele Giuseppe Esposito wrote: > > > On 08/07/2021 15:04, Stefan Hajnoczi wrote: > > On Thu, Jul 08, 2021 at 01:32:12PM +0200, Paolo Bonzini wrote: > > > On 08/07/21 12:36, Stefan Hajnoczi wrote: > > > > > What is very clear from this patch is that it

Re: [RFC PATCH 0/6] job: replace AioContext lock with job_mutex

2021-07-12 Thread Emanuele Giuseppe Esposito
On 08/07/2021 15:09, Stefan Hajnoczi wrote: On Wed, Jul 07, 2021 at 06:58:07PM +0200, Emanuele Giuseppe Esposito wrote: This is a continuation on the work to reduce (and possibly get rid of) the usage of AioContext lock, by introducing smaller granularity locks to keep the thread safety.

Re: [RFC PATCH 0/6] job: replace AioContext lock with job_mutex

2021-07-12 Thread Emanuele Giuseppe Esposito
On 08/07/2021 15:04, Stefan Hajnoczi wrote: On Thu, Jul 08, 2021 at 01:32:12PM +0200, Paolo Bonzini wrote: On 08/07/21 12:36, Stefan Hajnoczi wrote: What is very clear from this patch is that it is strictly related to the brdv_* and lower level calls, because they also internally check or

Re: [RFC PATCH 0/6] job: replace AioContext lock with job_mutex

2021-07-08 Thread Stefan Hajnoczi
On Wed, Jul 07, 2021 at 06:58:07PM +0200, Emanuele Giuseppe Esposito wrote: > This is a continuation on the work to reduce (and possibly get rid of) the > usage of AioContext lock, by introducing smaller granularity locks to keep > the thread safety. > > This series aims to: > 1) remove the

Re: [RFC PATCH 0/6] job: replace AioContext lock with job_mutex

2021-07-08 Thread Stefan Hajnoczi
On Thu, Jul 08, 2021 at 01:32:12PM +0200, Paolo Bonzini wrote: > On 08/07/21 12:36, Stefan Hajnoczi wrote: > > > What is very clear from this patch is that it > > > is strictly related to the brdv_* and lower level calls, because > > > they also internally check or even use the aiocontext lock. >

Re: [RFC PATCH 0/6] job: replace AioContext lock with job_mutex

2021-07-08 Thread Kevin Wolf
Am 08.07.2021 um 13:32 hat Paolo Bonzini geschrieben: > On 08/07/21 12:36, Stefan Hajnoczi wrote: > > > What is very clear from this patch is that it > > > is strictly related to the brdv_* and lower level calls, because > > > they also internally check or even use the aiocontext lock. > > >

Re: [RFC PATCH 0/6] job: replace AioContext lock with job_mutex

2021-07-08 Thread Paolo Bonzini
On 08/07/21 12:36, Stefan Hajnoczi wrote: What is very clear from this patch is that it is strictly related to the brdv_* and lower level calls, because they also internally check or even use the aiocontext lock. Therefore, in order to make it work, I temporarly added some

Re: [RFC PATCH 0/6] job: replace AioContext lock with job_mutex

2021-07-08 Thread Stefan Hajnoczi
On Wed, Jul 07, 2021 at 06:58:07PM +0200, Emanuele Giuseppe Esposito wrote: > This is a continuation on the work to reduce (and possibly get rid of) the > usage of AioContext lock, by introducing smaller granularity locks to keep > the thread safety. > > This series aims to: > 1) remove the

[RFC PATCH 0/6] job: replace AioContext lock with job_mutex

2021-07-07 Thread Emanuele Giuseppe Esposito
This is a continuation on the work to reduce (and possibly get rid of) the usage of AioContext lock, by introducing smaller granularity locks to keep the thread safety. This series aims to: 1) remove the aiocontext lock and substitute it with the already existing global job_mutex 2) fix what