diff options
author | David Hildenbrand <david@redhat.com> | 2021-12-17 14:46:09 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2022-01-07 05:19:55 -0500 |
commit | a960d6642d39f7d255b7b2b8bda3c2ae4e4e649b (patch) | |
tree | e96bff148489aac1d0420f57311fabc5e22d6b02 /util/qemu-sockets.c | |
parent | ac86e5c37df4963846d1a2e999696bb5031a99cd (diff) |
util/oslib-posix: Support concurrent os_mem_prealloc() invocation
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 shouldn't be a problem.
This is a preparation for future virtio-mem prealloc code, which will call
os_mem_prealloc() asynchronously from an iothread when handling guest
requests.
Reviewed-by: Pankaj Gupta <pankaj.gupta@ionos.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20211217134611.31172-7-david@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'util/qemu-sockets.c')
0 files changed, 0 insertions, 0 deletions