linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] fix THP migration for CMA allocations
@ 2020-02-27 21:32 Rik van Riel
  2020-02-27 21:32 ` [PATCH 1/2] mm,compaction,cma: add alloc_contig flag to compact_control Rik van Riel
  2020-02-27 21:32 ` [PATCH v2 2/2] mm,thp,compaction,cma: allow THP migration for CMA allocations Rik van Riel
  0 siblings, 2 replies; 11+ messages in thread
From: Rik van Riel @ 2020-02-27 21:32 UTC (permalink / raw)
  To: linux-kernel, riel
  Cc: kernel-team, akpm, linux-mm, mhocko, vbabka, mgorman, rientjes,
	aarcange, ziy, Rik van Riel

Transparent huge pages are allocated with __GFP_MOVABLE, and can end
up in CMA memory blocks. Transparent huge pages also have most of the
infrastructure in place to allow migration.

However, a few pieces were missing, causing THP migration to fail when
attempting to use CMA to allocate 1GB hugepages.

With these patches in place, THP migration from CMA blocks seems to
work, both for anonymous THPs and for tmpfs/shmem THPs.

v2:
- addressed comments by Vlastimil Babka and Zi Yan

Rik van Riel (2):
  mm,compaction,cma: add alloc_contig flag to compact_control
  mm,thp,compaction,cma: allow THP migration for CMA allocations

 mm/compaction.c | 16 +++++++++-------
 mm/internal.h   |  1 +
 mm/page_alloc.c |  7 +++++--
 3 files changed, 15 insertions(+), 9 deletions(-)

-- 
2.24.1



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-03-02  9:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-27 21:32 [PATCH v2 0/2] fix THP migration for CMA allocations Rik van Riel
2020-02-27 21:32 ` [PATCH 1/2] mm,compaction,cma: add alloc_contig flag to compact_control Rik van Riel
2020-02-27 21:32 ` [PATCH v2 2/2] mm,thp,compaction,cma: allow THP migration for CMA allocations Rik van Riel
2020-02-27 23:41   ` Mike Kravetz
2020-02-28  1:21     ` Rik van Riel
2020-02-28  4:30       ` Mike Kravetz
2020-02-28  8:25       ` Vlastimil Babka
2020-02-28 14:32         ` Rik van Riel
2020-02-28 14:39           ` Vlastimil Babka
2020-02-28 15:47             ` [PATCH] fix mmthpcompactioncma-allow-thp-migration-for-cma-allocations.patch Rik van Riel
2020-03-02  9:32   ` [PATCH v2 2/2] mm,thp,compaction,cma: allow THP migration for CMA allocations Vlastimil Babka

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).