Thread (78 messages) 78 messages, 7 authors, 2021-08-25

Re: [PATCH v3 04/14] mm/memremap: add ZONE_DEVICE support for compound pages

From: Christoph Hellwig <hch@infradead.org>
Date: 2021-07-15 12:59:53
Also in: linux-mm, nvdimm

On Wed, Jul 14, 2021 at 06:08:14PM -0700, Dan Williams wrote:
quoted
+static inline unsigned long pgmap_geometry(struct dev_pagemap *pgmap)
+{
+       if (!pgmap || !pgmap->geometry)
+               return PAGE_SIZE;
+       return pgmap->geometry;
+}
+
+static inline unsigned long pgmap_pfn_geometry(struct dev_pagemap *pgmap)
+{
+       return PHYS_PFN(pgmap_geometry(pgmap));
+}
Are both needed? Maybe just have ->geometry natively be in nr_pages
units directly, because pgmap_pfn_geometry() makes it confusing
whether it's a geometry of the pfn or the geometry of the pgmap.
Actually - do we need non-power of two sizes here?  Otherwise a shift
for the pfns would be really nice as that simplifies a lot of the
calculations.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help