]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: ZONE_DEVICE for "device memory"
authorDan Williams <dan.j.williams@intel.com>
Sun, 9 Aug 2015 19:29:06 +0000 (15:29 -0400)
committerDan Duval <dan.duval@oracle.com>
Wed, 7 Dec 2016 17:19:28 +0000 (12:19 -0500)
commit4c19087016e36a5f8d8be09ff1213ef7f8f57903
tree58f5de13695d769dc2c27652d5ae5003cc6706f8
parent6042a98e8c50fde53c493d6a61095e5597b81522
mm: ZONE_DEVICE for "device memory"

Orabug: 22913653

While pmem is usable as a block device or via DAX mappings to userspace
there are several usage scenarios that can not target pmem due to its
lack of struct page coverage. In preparation for "hot plugging" pmem
into the vmemmap add ZONE_DEVICE as a new zone to tag these pages
separately from the ones that are subject to standard page allocations.
Importantly "device memory" can be removed at will by userspace
unbinding the driver of the device.

Having a separate zone prevents allocation and otherwise marks these
pages that are distinct from typical uniform memory.  Device memory has
different lifetime and performance characteristics than RAM.  However,
since we have run out of ZONES_SHIFT bits this functionality currently
depends on sacrificing ZONE_DMA.

Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Jerome Glisse <j.glisse@gmail.com>
[hch: various simplifications in the arch interface]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Dan Duval <dan.duval@oracle.com>
(cherry picked from commit 033fbae988fcb67e5077203512181890848b8e90)

Conflicts:

include/linux/memory_hotplug.h
mm/Kconfig
12 files changed:
arch/ia64/mm/init.c
arch/powerpc/mm/mem.c
arch/s390/mm/init.c
arch/sh/mm/init.c
arch/tile/mm/init.c
arch/x86/mm/init_32.c
arch/x86/mm/init_64.c
include/linux/memory_hotplug.h
include/linux/mmzone.h
mm/Kconfig
mm/memory_hotplug.c
mm/page_alloc.c