[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201202052330.474592-1-pasha.tatashin@soleen.com>
Date: Wed, 2 Dec 2020 00:23:24 -0500
From: Pavel Tatashin <pasha.tatashin@...een.com>
To: pasha.tatashin@...een.com, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, akpm@...ux-foundation.org, vbabka@...e.cz,
mhocko@...e.com, david@...hat.com, osalvador@...e.de,
dan.j.williams@...el.com, sashal@...nel.org,
tyhicks@...ux.microsoft.com, iamjoonsoo.kim@....com,
mike.kravetz@...cle.com, rostedt@...dmis.org, mingo@...hat.com,
jgg@...pe.ca, peterz@...radead.org, mgorman@...e.de,
willy@...radead.org, rientjes@...gle.com, jhubbard@...dia.com
Subject: [PATCH 0/6] prohibit pinning pages in ZONE_MOVABLE
When page is pinned it cannot be moved and its physical address stays
the same until pages is unpinned.
This is useful functionality to allows userland to implementation DMA
access. For example, it is used by vfio in vfio_pin_pages().
However, this functionality breaks memory hotplug/hotremove assumptions
that pages in ZONE_MOVABLE can always be migrated.
This patch series fixes this issue by forcing new allocations during
page pinning to omit ZONE_MOVABLE, and also to migrate any existing
pages from ZONE_MOVABLE during pinning.
It uses the same scheme logic that is currently used by CMA, and extends
the functionality for all allocations.
For more information read the discussion [1] about this problem.
[1] https://lore.kernel.org/lkml/CA+CK2bBffHBxjmb9jmSKacm0fJMinyt3Nhk8Nx6iudcQSj80_w@mail.gmail.com/
Pavel Tatashin (6):
mm/gup: perform check_dax_vmas only when FS_DAX is enabled
mm/gup: don't pin migrated cma pages in movable zone
mm/gup: make __gup_longterm_locked common
mm cma: rename PF_MEMALLOC_NOCMA to PF_MEMALLOC_NOMOVABLE
mm: honor PF_MEMALLOC_NOMOVABLE for all allocations
mm/gup: migrate pinned pages out of movable zone
include/linux/migrate.h | 1 +
include/linux/sched.h | 2 +-
include/linux/sched/mm.h | 21 +++------
include/trace/events/migrate.h | 3 +-
mm/gup.c | 82 +++++++++++++---------------------
mm/hugetlb.c | 4 +-
mm/page_alloc.c | 26 ++++++-----
7 files changed, 58 insertions(+), 81 deletions(-)
--
2.25.1
Powered by blists - more mailing lists