[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YrKPPBGsT25FQFww@localhost.localdomain>
Date: Wed, 22 Jun 2022 05:40:44 +0200
From: Oscar Salvador <osalvador@...e.de>
To: Muchun Song <songmuchun@...edance.com>
Cc: akpm@...ux-foundation.org, corbet@....net, david@...hat.com,
mike.kravetz@...cle.com, paulmck@...nel.org,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, duanxiongchun@...edance.com, smuchun@...il.com
Subject: Re: [PATCH v5 2/2] mm: memory_hotplug: make hugetlb_optimize_vmemmap
compatible with memmap_on_memory
On Mon, Jun 20, 2022 at 07:06:16PM +0800, Muchun Song wrote:
> For now, the feature of hugetlb_free_vmemmap is not compatible with the
> feature of memory_hotplug.memmap_on_memory, and hugetlb_free_vmemmap
> takes precedence over memory_hotplug.memmap_on_memory. However, someone
> wants to make memory_hotplug.memmap_on_memory takes precedence over
> hugetlb_free_vmemmap since memmap_on_memory makes it more likely to
> succeed memory hotplug in close-to-OOM situations. So the decision
> of making hugetlb_free_vmemmap take precedence is not wise and elegant.
> The proper approach is to have hugetlb_vmemmap.c do the check whether
> the section which the HugeTLB pages belong to can be optimized. If
> the section's vmemmap pages are allocated from the added memory block
> itself, hugetlb_free_vmemmap should refuse to optimize the vmemmap,
> otherwise, do the optimization. Then both kernel parameters are
> compatible. So this patch introduces VmemmapSelfHosted to mask any
> non-optimizable vmemmap pages. The hugetlb_vmemmap can use this flag
> to detect if a vmemmap page can be optimized.
>
> Signed-off-by: Muchun Song <songmuchun@...edance.com>
> Co-developed-by: Oscar Salvador <osalvador@...e.de>
> Signed-off-by: Oscar Salvador <osalvador@...e.de>
LGTM, thanks for working on this!
--
Oscar Salvador
SUSE Labs
Powered by blists - more mailing lists