qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v0 0/4] backends/hostmem: add an ability to specify prealloc timeout
@ 2023-01-20 13:47 Daniil Tatianin
  2023-01-20 13:47 ` [PATCH 1/4] oslib: introduce new qemu_prealloc_mem_with_timeout() api Daniil Tatianin
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Daniil Tatianin @ 2023-01-20 13:47 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Daniil Tatianin, qemu-devel, Stefan Weil, David Hildenbrand,
	Igor Mammedov, yc-core

This series introduces new qemu_prealloc_mem_with_timeout() api,
which allows limiting the maximum amount of time to be spent on memory
preallocation. It also adds prealloc statistics collection that is
exposed via an optional timeout handler.

This new api is then utilized by hostmem for guest RAM preallocation
controlled via new object properties called 'prealloc-timeout' and
'prealloc-timeout-fatal'.

This is useful for limiting VM startup time on systems with
unpredictable page allocation delays due to memory fragmentation or the
backing storage. The timeout can be configured to either simply emit a
warning and continue VM startup without having preallocated the entire
guest RAM or just abort startup entirely if that is not acceptable for
a specific use case.

Daniil Tatianin (4):
  oslib: introduce new qemu_prealloc_mem_with_timeout() api
  backends/hostmem: move memory region preallocation logic into a helper
  backends/hostmem: add an ability to specify prealloc timeout
  backends/hostmem: add an ability to make prealloc timeout fatal

 backends/hostmem.c       | 112 +++++++++++++++++++++++++++++++-------
 include/qemu/osdep.h     |  19 +++++++
 include/sysemu/hostmem.h |   3 ++
 qapi/qom.json            |   8 +++
 util/oslib-posix.c       | 114 +++++++++++++++++++++++++++++++++++----
 util/oslib-win32.c       |   9 ++++
 6 files changed, 238 insertions(+), 27 deletions(-)

-- 
2.25.1



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-01-24  7:49 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-20 13:47 [PATCH v0 0/4] backends/hostmem: add an ability to specify prealloc timeout Daniil Tatianin
2023-01-20 13:47 ` [PATCH 1/4] oslib: introduce new qemu_prealloc_mem_with_timeout() api Daniil Tatianin
2023-01-20 13:47 ` [PATCH 2/4] backends/hostmem: move memory region preallocation logic into a helper Daniil Tatianin
2023-01-20 13:47 ` [PATCH 3/4] backends/hostmem: add an ability to specify prealloc timeout Daniil Tatianin
2023-01-20 13:47 ` [PATCH 4/4] backends/hostmem: add an ability to make prealloc timeout fatal Daniil Tatianin
2023-01-23  8:57 ` [PATCH v0 0/4] backends/hostmem: add an ability to specify prealloc timeout David Hildenbrand
2023-01-23 13:30   ` Daniil Tatianin
2023-01-23 13:47     ` Daniel P. Berrangé
2023-01-23 14:10       ` David Hildenbrand
2023-01-23 14:14       ` Daniil Tatianin
2023-01-23 14:16         ` David Hildenbrand
2023-01-23 16:01           ` Daniel P. Berrangé
2023-01-24  6:57         ` Valentin Sinitsyn
2023-01-23 13:56     ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).