[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 5/5] migration/ram: Optimize ram_write_tracking_start() fo
From: |
Juan Quintela |
Subject: |
Re: [PATCH v1 5/5] migration/ram: Optimize ram_write_tracking_start() for RamDiscardManager |
Date: |
Thu, 02 Feb 2023 12:20:57 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
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>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v1 5/5] migration/ram: Optimize ram_write_tracking_start() for RamDiscardManager,
Juan Quintela <=