diff options
author | Dan Williams <dan.j.williams@intel.com> | 2015-08-09 15:29:06 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2015-08-27 19:40:58 -0400 |
commit | 033fbae988fcb67e5077203512181890848b8e90 (patch) | |
tree | d0b9e418ab4f1df15435c098edf5ad687b426b3f /mm/page_alloc.c | |
parent | 012dcef3f058385268630c0003e9b7f8dcafbeb4 (diff) | |
download | linux-033fbae988fcb67e5077203512181890848b8e90.tar.gz linux-033fbae988fcb67e5077203512181890848b8e90.tar.bz2 linux-033fbae988fcb67e5077203512181890848b8e90.zip |
mm: ZONE_DEVICE for "device memory"
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>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index ef19f22b2b7d..0f19b4e18233 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -207,6 +207,9 @@ static char * const zone_names[MAX_NR_ZONES] = { "HighMem", #endif "Movable", +#ifdef CONFIG_ZONE_DEVICE + "Device", +#endif }; int min_free_kbytes = 1024; |