linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nitin Gupta <ngupta@nitingupta.dev>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: "Holger Hoffstätte" <holger@applied-asynchrony.com>,
	"Nitin Gupta" <nigupta@nvidia.com>,
	"Mel Gorman" <mgorman@techsingularity.net>,
	"Michal Hocko" <mhocko@suse.com>,
	"Matthew Wilcox" <willy@infradead.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Mike Kravetz" <mike.kravetz@oracle.com>,
	"Joonsoo Kim" <iamjoonsoo.kim@lge.com>,
	"David Rientjes" <rientjes@google.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>,
	"Linux API" <linux-api@vger.kernel.org>
Subject: Re: [PATCH v5] mm: Proactive compaction
Date: Thu, 28 May 2020 10:38:57 -0700	[thread overview]
Message-ID: <CAB6CXpCpr=rmokWS14tTvgkYaiFac-QKPg8xXFbKYn1uD5k0pg@mail.gmail.com> (raw)
In-Reply-To: <ab3e4c38-a7f9-01fc-f25f-f13f8e30985f@suse.cz>

On Thu, May 28, 2020 at 2:50 AM Vlastimil Babka <vbabka@suse.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


  reply	other threads:[~2020-05-28 17:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-18 18:14 Nitin Gupta
2020-05-26 17:19 ` Nitin Gupta
2020-05-27 10:18 ` Vlastimil Babka
2020-05-28 21:29   ` Nitin Gupta
2020-05-28  9:15 ` Holger Hoffstätte
2020-05-28  9:50   ` Vlastimil Babka
2020-05-28 17:38     ` Nitin Gupta [this message]
2020-05-28 23:29 ` Khalid Aziz
2020-05-29  0:55   ` Nitin Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAB6CXpCpr=rmokWS14tTvgkYaiFac-QKPg8xXFbKYn1uD5k0pg@mail.gmail.com' \
    --to=ngupta@nitingupta.dev \
    --cc=akpm@linux-foundation.org \
    --cc=holger@applied-asynchrony.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@suse.com \
    --cc=mike.kravetz@oracle.com \
    --cc=nigupta@nvidia.com \
    --cc=rientjes@google.com \
    --cc=vbabka@suse.cz \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox