Skip to contentSkip to conversation

mm: page_alloc less atomics (resend)

PATCH New Nick Piggin 1 participant 1 message Jan 25, 2006

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

PATCH 1/1 mm: page_alloc less atomics (resend)

Oops, forgot to cc linux-mm

--
More atomic operation removal from page allocator

include/linux/page-flags.h +2 -2
Index: linux-2.6/include/linux/page-flags.h
===================================================================
@@ -331,8 +331,8 @@ extern void __mod_page_state_offset(unsi
 #define TestClearPageReclaim(page) test_and_clear_bit(PG_reclaim, &(page)->flags)
 
 #define PageCompound(page)	test_bit(PG_compound, &(page)->flags)
-#define SetPageCompound(page)	set_bit(PG_compound, &(page)->flags)
-#define ClearPageCompound(page)	clear_bit(PG_compound, &(page)->flags)
+#define __SetPageCompound(page)	__set_bit(PG_compound, &(page)->flags)
+#define __ClearPageCompound(page) __clear_bit(PG_compound, &(page)->flags)
 
 #ifdef CONFIG_SWAP
 #define PageSwapCache(page)	test_bit(PG_swapcache, &(page)->flags)
mm/page_alloc.c +2 -2
Index: linux-2.6/mm/page_alloc.c
===================================================================
@@ -189,7 +189,7 @@ static void prep_compound_page(struct pa
 	for (i = 0; i < nr_pages; i++) {
 		struct page *p = page + i;
 
-		SetPageCompound(p);
+		__SetPageCompound(p);
 		set_page_private(p, (unsigned long)page);
 	}
 }
@@ -208,7 +208,7 @@ static void destroy_compound_page(struct
 		if (unlikely(!PageCompound(p) |
 				(page_private(p) != (unsigned long)page)))
 			bad_page(page);
-		ClearPageCompound(p);
+		__ClearPageCompound(p);
 	}
 }
 

--
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>