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