All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: David Hildenbrand <david@redhat.com>
Cc: qemu-devel@nongnu.org,
	 "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Peter Xu <peterx@redhat.com>,
	 Andrey Gruzdev <andrey.gruzdev@virtuozzo.com>
Subject: Re: [PATCH v1 5/5] migration/ram: Optimize ram_write_tracking_start() for RamDiscardManager
Date: Thu, 02 Feb 2023 12:20:57 +0100	[thread overview]
Message-ID: <87fsboqpnq.fsf@secure.mitica> (raw)
In-Reply-To: <20230105124528.93813-6-david@redhat.com> (David Hildenbrand's message of "Thu, 5 Jan 2023 13:45:28 +0100")

David Hildenbrand <david@redhat.com> wrote:
> ram_block_populate_read() already optimizes for RamDiscardManager.
> However, ram_write_tracking_start() will still try protecting discarded
> memory ranges.
>
> Let's optimize, because discarded ranges don't map any pages and
>
> (1) For anonymous memory, trying to protect using uffd-wp without a mapped
>     page is ignored by the kernel and consequently a NOP.
>
> (2) For shared/file-backed memory, we will fill present page tables in the
>     range with PTE markers. However, we will even allocate page tables
>     just to fill them with unnecessary PTE markers and effectively
>     waste memory.
>
> So let's exclude these ranges, just like ram_block_populate_read()
> already does.
>
> Signed-off-by: David Hildenbrand <david@redhat.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>



  reply	other threads:[~2023-02-02 11:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-05 12:45 [PATCH v1 0/5] migration/ram: background snapshot fixes and optimiations David Hildenbrand
2023-01-05 12:45 ` [PATCH v1 1/5] migration/ram: Fix populate_read_range() David Hildenbrand
2023-02-02 11:15   ` Juan Quintela
2023-01-05 12:45 ` [PATCH v1 2/5] migration/ram: Fix error handling in ram_write_tracking_start() David Hildenbrand
2023-02-02 11:16   ` Juan Quintela
2023-01-05 12:45 ` [PATCH v1 3/5] migration/ram: Don't explicitly unprotect when unregistering uffd-wp David Hildenbrand
2023-02-02 11:17   ` Juan Quintela
2023-01-05 12:45 ` [PATCH v1 4/5] migration/ram: Rely on used_length for uffd_change_protection() David Hildenbrand
2023-02-02 11:18   ` Juan Quintela
2023-01-05 12:45 ` [PATCH v1 5/5] migration/ram: Optimize ram_write_tracking_start() for RamDiscardManager David Hildenbrand
2023-02-02 11:20   ` Juan Quintela [this message]
2023-01-05 21:11 ` [PATCH v1 0/5] migration/ram: background snapshot fixes and optimiations Peter Xu
2023-01-09  8:37   ` David Hildenbrand
2023-01-23 14:27 ` David Hildenbrand
2023-02-02 11:21   ` Juan Quintela

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=87fsboqpnq.fsf@secure.mitica \
    --to=quintela@redhat.com \
    --cc=andrey.gruzdev@virtuozzo.com \
    --cc=david@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=peterx@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 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.