Thread (53 messages) 53 messages, 9 authors, 2024-10-30

Re: [PATCH 04/12] mm: Allow compound zone device pages

From: Matthew Wilcox <willy@infradead.org>
Date: 2024-09-10 04:48:11
Also in: linux-arm-kernel, linux-cxl, linux-ext4, linux-fsdevel, linux-mm, linux-xfs, linuxppc-dev, lkml, nvdimm

On Tue, Sep 10, 2024 at 02:14:29PM +1000, Alistair Popple wrote:
quoted hunk ↗ jump to hunk
@@ -337,6 +341,7 @@ struct folio {
 	/* private: */
 				};
 	/* public: */
+			struct dev_pagemap *pgmap;
Shouldn't that be indented by one more tab stop?

And for ease of reading, perhaps it should be placed either immediately
before or after 'struct list_head lru;'?
quoted hunk ↗ jump to hunk
+++ b/include/linux/mmzone.h
@@ -1134,6 +1134,12 @@ static inline bool is_zone_device_page(const struct page *page)
 	return page_zonenum(page) == ZONE_DEVICE;
 }
 
+static inline struct dev_pagemap *page_dev_pagemap(const struct page *page)
+{
+	WARN_ON(!is_zone_device_page(page));
+	return page_folio(page)->pgmap;
+}
I haven't read to the end yet, but presumably we'll eventually want:

static inline struct dev_pagemap *folio_dev_pagemap(const struct folio *folio)
{
	WARN_ON(!folio_is_zone_device(folio))
	return folio->pgmap;
}

and since we'll want it eventually, maybe now is the time to add it,
and make page_dev_pagemap() simply call it?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help