linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC] buddy allocator without bitmap [4/4]
@ 2004-08-26 12:15 Hiroyuki KAMEZAWA
  2004-08-26 15:54 ` Dave Hansen
  0 siblings, 1 reply; 2+ messages in thread
From: Hiroyuki KAMEZAWA @ 2004-08-26 12:15 UTC (permalink / raw)
  To: Linux Kernel ML; +Cc: LHMS, linux-mm, William Lee Irwin III, Dave Hansen

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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-08-26 15:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-26 12:15 [RFC] buddy allocator without bitmap [4/4] Hiroyuki KAMEZAWA
2004-08-26 15:54 ` Dave Hansen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox