All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Aadeshveer Singh <aadeshveer07@gmail.com>
Cc: qemu-devel@nongnu.org, farosas@suse.de, pbonzini@redhat.com,
	philmd@mailo.com, lvivier@redhat.com, ayoub@saferwall.com,
	pierrick.bouvier@oss.qualcomm.com
Subject: Re: [PATCH v3 06/11] migration: add RAMBlock field and helper for fast snapshot load
Date: Mon, 20 Jul 2026 14:39:09 -0400	[thread overview]
Message-ID: <al5rTdgBKxKOMCEt@x1.local> (raw)
In-Reply-To: <20260714141547.1268000-7-aadeshveer07@gmail.com>

On Tue, Jul 14, 2026 at 07:45:42PM +0530, Aadeshveer Singh wrote:
> +static void ramblock_pending_bmap_init(void)
> +{
> +    RAMBlock *rb;
> +
> +    RAMBLOCK_FOREACH_NOT_IGNORED(rb) {
> +        assert(!rb->pending_bmap);
> +        size_t size = rb->max_length >> qemu_target_page_bits();

I forgot one thing here: I think it should use qemu_ram_pagesize(), for
huge pages when the fault thread or eager load thread want to figure how
who to do the work, it should always be in host psize, not guest-psize,
because that's the granule userfaultfd's UFFDIO_COPY/ZEROPAGE uses.

> +        rb->pending_bmap = bitmap_new(size);
> +        bitmap_set(rb->pending_bmap, 0, size);
> +    }
> +}

-- 
Peter Xu



  parent reply	other threads:[~2026-07-20 18:40 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14 14:15 [PATCH v3 00/11] migration: fast snapshot load Aadeshveer Singh
2026-07-14 14:15 ` [PATCH v3 01/11] migration: Propagate error in postcopy setup functions Aadeshveer Singh
2026-07-20 15:43   ` Peter Xu
2026-07-14 14:15 ` [PATCH v3 02/11] migration: Extract blocktime marking helper Aadeshveer Singh
2026-07-20 15:43   ` Peter Xu
2026-07-14 14:15 ` [PATCH v3 03/11] migration: Rename postcopy_listen_thread_bh Aadeshveer Singh
2026-07-20 16:01   ` Peter Xu
2026-07-14 14:15 ` [PATCH v3 04/11] migration: Use file_bmap for RAMBlock during incoming file load Aadeshveer Singh
2026-07-20 16:02   ` Peter Xu
2026-07-14 14:15 ` [PATCH v3 05/11] migration: Make qemu_get_buffer_at() thread-safe Aadeshveer Singh
2026-07-20 16:03   ` Peter Xu
2026-07-14 14:15 ` [PATCH v3 06/11] migration: add RAMBlock field and helper for fast snapshot load Aadeshveer Singh
2026-07-20 16:23   ` Peter Xu
2026-07-20 18:39   ` Peter Xu [this message]
2026-07-14 14:15 ` [PATCH v3 07/11] migration: add support for fault thread to load pages from disk Aadeshveer Singh
2026-07-20 19:04   ` Peter Xu
2026-07-14 14:15 ` [PATCH v3 08/11] migration: add eager load thread and setup for fast snapshot load Aadeshveer Singh
2026-07-20 19:21   ` Peter Xu
2026-07-14 14:15 ` [PATCH v3 09/11] migration/tests: remove capability conflict test postcopy-ram+mapped-ram Aadeshveer Singh
2026-07-20 19:29   ` Peter Xu
2026-07-14 14:15 ` [PATCH v3 10/11] migration/tests: Add test for fast snapshot load Aadeshveer Singh
2026-07-20 19:30   ` Peter Xu
2026-07-14 14:15 ` [PATCH v3 11/11] docs/migration: Add documentation for fast snapshot load feature Aadeshveer Singh
2026-07-20 19:42   ` Peter Xu
2026-07-20 19:24 ` [PATCH v3 00/11] migration: fast snapshot load Peter Xu

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=al5rTdgBKxKOMCEt@x1.local \
    --to=peterx@redhat.com \
    --cc=aadeshveer07@gmail.com \
    --cc=ayoub@saferwall.com \
    --cc=farosas@suse.de \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@mailo.com \
    --cc=pierrick.bouvier@oss.qualcomm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.