Thread (48 messages) 48 messages, 6 authors, 2021-11-05

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

flat view

From: Christoph Hellwig <hch@lst.de>
Date: 2021-08-27 15:33:14
Also in: linux-mm, nvdimm

On Fri, Aug 27, 2021 at 03:58:09PM +0100, Joao Martins wrote:
quoted hunk ↗ jump to hunk
+ * @geometry: structural definition of how the vmemmap metadata is populated.
+ *	A zero or 1 defaults to using base pages as the memmap metadata
+ *	representation. A bigger value will set up compound struct pages
+ *	representative of the requested geometry size.
  * @ops: method table
  * @owner: an opaque pointer identifying the entity that manages this
  *	instance.  Used by various helpers to make sure that no
@@ -114,6 +118,7 @@ struct dev_pagemap {
 	struct completion done;
 	enum memory_type type;
 	unsigned int flags;
+	unsigned long geometry;
So why not make this a shift as I suggested somewhere deep in the
last thread?  Also geometry sounds a bit strange, even if I can't really
offer anything better offhand.
quoted hunk ↗ jump to hunk
+static inline unsigned long pgmap_geometry(struct dev_pagemap *pgmap)
+{
+	if (pgmap && pgmap->geometry)
+		return pgmap->geometry;
Why does this need to support a NULL pgmap?
+static void __ref memmap_init_compound(struct page *head, unsigned long head_pfn,
Overly long line.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help