linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: David Rientjes <rientjes@google.com>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Mel Gorman <mgorman@techsingularity.net>
Cc: Michal Hocko <mhocko@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
	Vlastimil Babka <vbabka@suse.cz>
Subject: [RFC 0/3] reduce THP fault thrashing
Date: Tue, 11 Dec 2018 15:29:38 +0100	[thread overview]
Message-ID: <20181211142941.20500-1-vbabka@suse.cz> (raw)

Hi,

this is my attempt at reducing the madvised THP fault local node thrashing by
reclaim+compaction attempts which Andrea reported, by trying to better utilize
recent compaction results. It doesn't introduce any new __GFP_ONLY_COMPACT flag
or add order-specific decisions like Andrea's and David's previous patches, but
it does add __GFP_NORETRY back to madvised THP faults, like they both did
(Patch 1). Patch 2 is based on another Andrea's suggestion, where any
compaction failure is a reason to not try further (not just defered
compaction). Finally, patch 3 introduces defered compaction tracking for async
mode which is what's used for THP faults. Details in respective patch
changelogs.

I haven't tested it yet besides running transhuge-stress and verifying via
tracepoints that defered async compaction does happen. I hope all interested
parties can test the series on their workloads, thanks in advance. I expect
that THP fault success rates will be worse, but hopefully it will also fix
the local node thrashing issue. The success rates can then likely be improved
by making compaction core smarter, but that's a separate topic.

The series is based on v4.20-rc6.

Vlastimil

Vlastimil Babka (3):
  mm, thp: restore __GFP_NORETRY for madvised thp fault allocations
  mm, page_alloc: reclaim for __GFP_NORETRY costly requests only when
    compaction was skipped
  mm, compaction: introduce deferred async compaction

 include/linux/compaction.h        | 10 ++--
 include/linux/mmzone.h            |  6 +--
 include/trace/events/compaction.h | 29 ++++++-----
 mm/compaction.c                   | 80 ++++++++++++++++++-------------
 mm/huge_memory.c                  | 13 +++--
 mm/page_alloc.c                   | 14 +++---
 6 files changed, 84 insertions(+), 68 deletions(-)

-- 
2.19.2

             reply	other threads:[~2018-12-11 14:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11 14:29 Vlastimil Babka [this message]
2018-12-11 14:29 ` [RFC 1/3] mm, thp: restore __GFP_NORETRY for madvised thp fault allocations Vlastimil Babka
2019-01-08 11:16   ` Mel Gorman
2019-01-10 13:52     ` Vlastimil Babka
2019-01-10 14:55       ` Mel Gorman
2018-12-11 14:29 ` [RFC 2/3] mm, page_alloc: reclaim for __GFP_NORETRY costly requests only when compaction was skipped Vlastimil Babka
2019-01-08 11:25   ` Mel Gorman
2018-12-11 14:29 ` [RFC 3/3] mm, compaction: introduce deferred async compaction Vlastimil Babka
2019-01-08 11:28   ` Mel Gorman

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=20181211142941.20500-1-vbabka@suse.cz \
    --to=vbabka@suse.cz \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@kernel.org \
    --cc=rientjes@google.com \
    --cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).