lkml.org 
[lkml]   [2004]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.062 / U:0.960 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site