[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ab3e4c38-a7f9-01fc-f25f-f13f8e30985f@suse.cz>
Date: Thu, 28 May 2020 11:50:40 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: Holger Hoffstätte <holger@...lied-asynchrony.com>,
Nitin Gupta <nigupta@...dia.com>,
Mel Gorman <mgorman@...hsingularity.net>,
Michal Hocko <mhocko@...e.com>
Cc: Matthew Wilcox <willy@...radead.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Mike Kravetz <mike.kravetz@...cle.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
David Rientjes <rientjes@...gle.com>,
Nitin Gupta <ngupta@...ingupta.dev>,
linux-kernel <linux-kernel@...r.kernel.org>,
linux-mm <linux-mm@...ck.org>,
Linux API <linux-api@...r.kernel.org>
Subject: Re: [PATCH v5] mm: Proactive compaction
On 5/28/20 11:15 AM, Holger Hoffstätte wrote:
>
> On 5/18/20 8:14 PM, Nitin Gupta wrote:
> [patch v5 :)]
>
> I've been successfully using this in my tree and it works great, but a friend
> who also uses my tree just found a bug (actually an improvement ;) due to the
> change from HUGETLB_PAGE_ORDER to HPAGE_PMD_ORDER in v5.
>
> When building with CONFIG_TRANSPARENT_HUGEPAGE=n (for some reason it was off)
> HPAGE_PMD_SHIFT expands to BUILD_BUG() and compilation fails like this:
Oops, I forgot about this. Still I believe HPAGE_PMD_ORDER is the best choice as
long as THP's are enabled. I guess fallback to HUGETLB_PAGE_ORDER would be
possible if THPS are not enabled, but AFAICS some architectures don't define
that. Such architectures perhaps won't benefit from proactive compaction anyway?
> ...
> ./include/linux/huge_mm.h:284:28: note: in expansion of macro ‘BUILD_BUG’
> 284 | #define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; })
> | ^~~~~~~~~
> ./include/linux/huge_mm.h:78:26: note: in expansion of macro ‘HPAGE_PMD_SHIFT’
> 78 | #define HPAGE_PMD_ORDER (HPAGE_PMD_SHIFT-PAGE_SHIFT)
> | ^~~~~~~~~~~~~~~
> mm/compaction.c:1874:28: note: in expansion of macro ‘HPAGE_PMD_ORDER’
> 1874 | extfrag_for_order(zone, HPAGE_PMD_ORDER);
> | ^~~~~~~~~~~~~~~
> ...
>
> It would be great if the whole thing would compile without THP; the only
> occurrence is in fragmentation_score_zone(). Unfortunately I'm not familiar
> enough with how to properly check for THP and properly calculate whatever
> you're doing there, otherwise I would ifdef this away myself. ;)
>
> Thanks for an otherwise great patch!
>
> cheers,
> Holger
>
Powered by blists - more mailing lists