From: Mark Kanda <mark.kanda@oracle.com>
To: David Hildenbrand <david@redhat.com>, qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, berrange@redhat.com
Subject: Re: [PATCH v3 1/1] oslib-posix: initialize backend memory objects in parallel
Date: Wed, 31 Jan 2024 08:48:33 -0600 [thread overview]
Message-ID: <6a5773e2-6887-4cd6-995a-209affd71b74@oracle.com> (raw)
In-Reply-To: <7686daa5-c175-4b2c-a6ad-72d3c78b2249@redhat.com>
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
next prev parent reply other threads:[~2024-01-31 14:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 13:48 [PATCH v3 0/1] Initialize backend memory objects in parallel Mark Kanda
2024-01-31 13:48 ` [PATCH v3 1/1] oslib-posix: initialize " Mark Kanda
2024-01-31 14:04 ` David Hildenbrand
2024-01-31 14:27 ` Mark Kanda
2024-01-31 14:30 ` David Hildenbrand
2024-01-31 14:48 ` Mark Kanda [this message]
2024-01-31 14:57 ` David Hildenbrand
2024-01-31 15:02 ` Mark Kanda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6a5773e2-6887-4cd6-995a-209affd71b74@oracle.com \
--to=mark.kanda@oracle.com \
--cc=berrange@redhat.com \
--cc=david@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).