[PATCH v1 09/10] mm/memory_hotplug: Don't mark pages PG_reserved when initializing the memmap

Boris Ostrovsky boris.ostrovsky at oracle.com
Tue Nov 5 09:44:33 AEDT 2019


On 10/24/19 8:09 AM, David Hildenbrand wrote:
> diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
> index 4f2e78a5e4db..af69f057913a 100644
> --- a/drivers/xen/balloon.c
> +++ b/drivers/xen/balloon.c
> @@ -374,6 +374,13 @@ static void xen_online_page(struct page *page, unsigned int order)
>  	mutex_lock(&balloon_mutex);
>  	for (i = 0; i < size; i++) {
>  		p = pfn_to_page(start_pfn + i);
> +		/*
> +		 * TODO: The core used to mark the pages reserved. Most probably
> +		 * we can stop doing that now. However, especially
> +		 * alloc_xenballooned_pages() left PG_reserved set
> +		 * on pages that can get mapped to user space.
> +		 */
> +		__SetPageReserved(p);

I suspect this is not needed. Pages can get into balloon either from
here or from non-hotplug path (e.g. decrease_reservation()) and so when
we get a page from the balloon we would get a random page that may or
may not have Reserved bit set.

-boris


>  		balloon_append(p);
>  	}
>  	mutex_unlock(&balloon_mutex);
>



More information about the Linuxppc-dev mailing list