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 <email@example.com> Cc: Ingo Molnar <firstname.lastname@example.org> Cc: Dave Hansen <email@example.com> Cc: Rik van Riel <firstname.lastname@example.org> Cc: Mel Gorman <email@example.com> Cc: Jerome Glisse <firstname.lastname@example.org> [hch: various simplifications in the arch interface] Signed-off-by: Christoph Hellwig <email@example.com> Signed-off-by: Dan Williams <firstname.lastname@example.org>
Showing with 70 additions and 17 deletions