[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 04/15] Fold postcopy_ram_discard_range into ram_
From: |
Juan Quintela |
Subject: |
Re: [Qemu-devel] [PATCH 04/15] Fold postcopy_ram_discard_range into ram_discard_range |
Date: |
Wed, 25 Jan 2017 11:08:00 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
"Dr. David Alan Gilbert (git)" <address@hidden> wrote:
> From: "Dr. David Alan Gilbert" <address@hidden>
>
> I'd created this weird pair of:
> ram_discard_range that lived in migration/ram.c
> Which is built target-dependent so can access the insides of
> RAMBlock
>
> postcopy_ram_discard_range
> Which actually does the discard.
>
> Flatten these down into ram_discard_range, this relies on the
> CONFIG_MADVISE check to be sure we have the real DONTNEED madvise
> rather than the posix variant that isn't guaranteed to discard pages.
>
> Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
> @@ -1877,7 +1879,15 @@ int ram_discard_range(MigrationIncomingState *mis,
> host_endaddr);
> goto err;
> }
> - ret = postcopy_ram_discard_range(mis, host_startaddr, length);
> + errno = ENOTSUP;
> +#if defined(CONFIG_MADVISE)
> + ret = qemu_madvise(host_startaddr, length, QEMU_MADV_DONTNEED);
> +#endif
This really looks weird, we shouldn't arrive here if CONFIG_MADVISE is
not configured, no?
Later, Juan.
- Re: [Qemu-devel] [01/15] postcopy: Transmit and compare individual page sizes, (continued)
[Qemu-devel] [PATCH 02/15] postcopy: Transmit ram size summary word, Dr. David Alan Gilbert (git), 2017/01/06
[Qemu-devel] [PATCH 05/15] postcopy: enhance ram_discard_range for hugepages, Dr. David Alan Gilbert (git), 2017/01/06
[Qemu-devel] [PATCH 04/15] Fold postcopy_ram_discard_range into ram_discard_range, Dr. David Alan Gilbert (git), 2017/01/06
- Re: [Qemu-devel] [PATCH 04/15] Fold postcopy_ram_discard_range into ram_discard_range,
Juan Quintela <=
[Qemu-devel] [PATCH 03/15] postcopy: Chunk discards for hugepages, Dr. David Alan Gilbert (git), 2017/01/06
[Qemu-devel] [PATCH 06/15] postcopy: Record largest page size, Dr. David Alan Gilbert (git), 2017/01/06
[Qemu-devel] [PATCH 08/15] postcopy: Use temporary for placing zero huge pages, Dr. David Alan Gilbert (git), 2017/01/06
[Qemu-devel] [PATCH 07/15] postcopy: Plumb pagesize down into place helpers, Dr. David Alan Gilbert (git), 2017/01/06