Skip to contentSkip to conversation

buddy allocator without bitmap [4/4]

RFC In review Hiroyuki KAMEZAWA 2 participants 2 messages Aug 26, 2004

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

RFC 1/1 buddy allocator without bitmap [4/4]

This patch 5th inserts prefetch().
I think These prefetch are reasonable and helpful.

-- Kame
====================================================================

---

 linux-2.6.8.1-mm4-kame-kamezawa/mm/page_alloc.c |    2 ++
 1 files changed, 2 insertions(+)
mm/page_alloc.c renamed from mm/page_alloc.c~eliminate-bitmap-prefetch +2 -0
diff -puN mm/page_alloc.c~eliminate-bitmap-prefetch mm/page_alloc.c
@@ -257,6 +257,7 @@ static inline void __free_pages_bulk (st
 		order++;
 		mask <<= 1;
 		page_idx &= mask;
+		prefetch(base + (page_idx ^ (1 << order)));
 		list_del(&buddy->lru);
 		/* for propriety of PG_private bit, we clear it */
 		buddy->flags &= ~(1 << PG_private);
@@ -360,6 +361,7 @@ expand(struct zone *zone, struct page *p
 		area--;
 		high--;
 		size >>= 1;
+		prefetch(&page[size >> 1]);
 		BUG_ON(bad_range(zone, &page[size]));
 		list_add(&page[size].lru, &area->free_list);
 		page[size].flags |= (1 << PG_private);

_

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