Messages in this thread Patch in this message | | | Date | Thu, 26 Aug 2004 21:15:14 +0900 | From | Hiroyuki KAMEZAWA <> | Subject | [RFC] 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(+)
diff -puN mm/page_alloc.c~eliminate-bitmap-prefetch mm/page_alloc.c --- linux-2.6.8.1-mm4-kame/mm/page_alloc.c~eliminate-bitmap-prefetch 2004-08-26 19:32:01.598461736 +0900 +++ linux-2.6.8.1-mm4-kame-kamezawa/mm/page_alloc.c 2004-08-26 19:32:01.602461128 +0900 @@ -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 from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |