[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAB6CXpCpr=rmokWS14tTvgkYaiFac-QKPg8xXFbKYn1uD5k0pg@mail.gmail.com>
Date: Thu, 28 May 2020 10:38:57 -0700
From: Nitin Gupta <ngupta@...ingupta.dev>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: Holger Hoffstätte <holger@...lied-asynchrony.com>,
Nitin Gupta <nigupta@...dia.com>,
Mel Gorman <mgorman@...hsingularity.net>,
Michal Hocko <mhocko@...e.com>,
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>,
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 Thu, May 28, 2020 at 2:50 AM Vlastimil Babka <vbabka@...e.cz> wrote:
>
> 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?
>
I am not sure about such architectures but in such cases, we would end
up calculating
"fragmentation score" based on a page size which does not match the
architecture's
view of the "default hugepage size" which is not a terrible thing in
itself as compaction
can still be done in the background, after all.
Since we always need a target order to calculate the fragmentation score, how
about this fallack scheme:
HPAGE_PMD_ORDER -> HUGETLB_PAGE_ORDER -> PMD_ORDER
Thanks,
Nitin
Powered by blists - more mailing lists