Skip to contentSkip to conversation

pearing off zone from physical memory layout [2/10] add helper function page_node()

RFC New KAMEZAWA Hiroyuki 1 participant 1 message Feb 3, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC 1/1 pearing off zone from physical memory layout [2/10] add helper function page_node()

A helper function to access pgdat from pages.

include/linux/mm.h +6 -0
Index: hogehoge/include/linux/mm.h
===================================================================
@@ -478,6 +478,12 @@ static inline unsigned long page_to_nid(
 	else
 		return page_zone(page)->zone_pgdat->node_id;
 }
+
+static inline struct pglist_data *page_node(struct page *page)
+{
+	return NODE_DATA(page_to_nid(page));
+}
+
 static inline unsigned long page_to_section(struct page *page)
 {
 	return (page->flags >> SECTIONS_PGSHIFT) & SECTIONS_MASK;

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>