[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 1/1] oslib-posix: initialize backend memory objects in par
From: |
Mark Kanda |
Subject: |
Re: [PATCH v3 1/1] oslib-posix: initialize backend memory objects in parallel |
Date: |
Wed, 31 Jan 2024 08:48:33 -0600 |
User-agent: |
Mozilla Thunderbird |
On 1/31/24 8:30 AM, David Hildenbrand wrote:
OK. I'll call it 'PHASE_LATE_BACKENDS_CREATED' (to make it consistent
with code comments/function name).
But then, you should set it at the very end of the function (not sure
if that would be a problem with the other devices that are getting
created in between -- if they would be using one of these memory
backends; likely not).
I think I misunderstood your suggestion. I was planning to add it a
'phase_advance(PHASE_LATE_BACKENDS_CREATED)' to qemu_init():
@@ -3703,6 +3703,7 @@ void qemu_init(int argc, char **argv)
* over memory-backend-file objects).
*/
qemu_create_late_backends();
+ phase_advance(PHASE_LATE_BACKENDS_CREATED);
And use PHASE_LATE_BACKENDS_CREATED (instead of
PHASE_MACHINE_INITIALIZED) for the async bool in
host_memory_backend_memory_complete().
I was planning to leave this call where it is:
@@ -2009,6 +2009,14 @@ static void qemu_create_late_backends(void)
object_option_foreach_add(object_create_late);
+ /*
+ * Wait for any outstanding memory prealloc from created memory
+ * backends to complete.
+ */
+ if (!qemu_finish_async_mem_prealloc(&error_fatal)) {
+ exit(1);
+ }
+
if (tpm_init() < 0) {
exit(1);
}
Is this what you had in mind?
Thanks/regards,
-Mark