linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: Rik van Riel <riel@surriel.com>
Cc: hughd@google.com, xuyu@linux.alibaba.com,
	akpm@linux-foundation.org, mgorman@suse.de, aarcange@redhat.com,
	willy@infradead.org, linux-kernel@vger.kernel.org,
	kernel-team@fb.com, linux-mm@kvack.org, vbabka@suse.cz
Subject: Re: [PATCH 1/2] mm,thp,shmem: limit shmem THP alloc gfp_mask
Date: Thu, 19 Nov 2020 10:37:03 +0100	[thread overview]
Message-ID: <20201119093703.GB12284@dhcp22.suse.cz> (raw)
In-Reply-To: <84effe90c3ee13fbfa6e732d2e3b3d9b557d1be1.camel@surriel.com>

On Fri 13-11-20 22:44:20, Rik van Riel wrote:
> On Thu, 2020-11-12 at 11:52 +0100, Michal Hocko wrote:
> > On Thu 05-11-20 14:15:07, Rik van Riel wrote:
> > > 
> > > This patch applies the same configurated limitation of THPs to
> > > shmem
> > > hugepage allocations, to prevent that from happening.
> > 
> > I believe you should also exaplain why we want to control defrag by
> > the
> > global knob while the enable logic is per mount.
> 
> I added that to the changelog for the next version of
> the patches.
> 
> > > This way a THP defrag setting of "never" or "defer+madvise" will
> > > result
> > > in quick allocation failures without direct reclaim when no 2MB
> > > free
> > > pages are available.
> > > 
> > > With this patch applied, THP allocations for tmpfs will be a little
> > > more aggressive than today for files mmapped with MADV_HUGEPAGE,
> > > and a little less aggressive for files that are not mmapped or
> > > mapped without that flag.
> > 
> > This begs some numbers. A little is rather bad unit of performance. I
> > do
> > agree that unifying those makes sense in general though.
> 
> The aggressiveness is in changes to the gfp_mask, eg by
> adding __GFP_NORETRY. How that translates into THP
> allocation success rates is entirely dependent on the
> workload and on what else is in memory at the time.

Yes and that is why I would argue about consistency with THP rather than
put claims that hard to back by numbers.

-- 
Michal Hocko
SUSE Labs


  reply	other threads:[~2020-11-19  9:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05 19:15 [PATCH 0/2] mm,thp,shm: limit shmem THP alloc gfp_mask Rik van Riel
2020-11-05 19:15 ` [PATCH 1/2] mm,thp,shmem: " Rik van Riel
2020-11-12 10:52   ` Michal Hocko
2020-11-14  3:44     ` Rik van Riel
2020-11-19  9:37       ` Michal Hocko [this message]
2020-11-05 19:15 ` [PATCH 2/2] mm,thp,shm: limit gfp mask to no more than specified Rik van Riel
2020-11-06  3:05   ` Hillf Danton
2020-11-06 17:53     ` Rik van Riel
2020-11-07  1:58       ` Hillf Danton
2020-11-12 11:22   ` Michal Hocko
2020-11-14  3:40     ` Rik van Riel
2020-11-19  9:38       ` Michal Hocko
2020-11-23 19:39         ` Rik van Riel

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=20201119093703.GB12284@dhcp22.suse.cz \
    --to=mhocko@suse.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=riel@surriel.com \
    --cc=vbabka@suse.cz \
    --cc=willy@infradead.org \
    --cc=xuyu@linux.alibaba.com \
    /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;
as well as URLs for NNTP newsgroup(s).