Re: [PATCH v3 6/7] util/oslib-posix: Support concurrent os_mem_prealloc() invocation

2021-09-28 Thread David Hildenbrand
On 28.09.21 18:56, Daniel P. Berrangé wrote: On Mon, Aug 16, 2021 at 11:47:38AM +0200, David Hildenbrand wrote: Add a mutex to protect the SIGBUS case, as we cannot mess concurrently with the sigbus handler and we have to manage the global variable sigbus_memset_context. The MADV_POPULATE_WRITE

Re: [PATCH v3 6/7] util/oslib-posix: Support concurrent os_mem_prealloc() invocation

2021-09-28 Thread Daniel P . Berrangé
On Tue, Sep 28, 2021 at 05:56:41PM +0100, Daniel P. Berrangé wrote: > On Mon, Aug 16, 2021 at 11:47:38AM +0200, David Hildenbrand wrote: > > Add a mutex to protect the SIGBUS case, as we cannot mess concurrently > > with the sigbus handler and we have to manage the global variable > > sigbus_memset

Re: [PATCH v3 6/7] util/oslib-posix: Support concurrent os_mem_prealloc() invocation

2021-09-28 Thread Daniel P . Berrangé
On Mon, Aug 16, 2021 at 11:47:38AM +0200, David Hildenbrand wrote: > Add a mutex to protect the SIGBUS case, as we cannot mess concurrently > with the sigbus handler and we have to manage the global variable > sigbus_memset_context. The MADV_POPULATE_WRITE path can run > concurrently. > > Note tha

[PATCH v3 6/7] util/oslib-posix: Support concurrent os_mem_prealloc() invocation

2021-08-16 Thread David Hildenbrand
Add a mutex to protect the SIGBUS case, as we cannot mess concurrently with the sigbus handler and we have to manage the global variable sigbus_memset_context. The MADV_POPULATE_WRITE path can run concurrently. Note that page_mutex and page_cond are shared between concurrent invocations, which sho