linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC] free_area[] bitmap elimination [2/3]
@ 2004-08-21  2:38 Hiroyuki KAMEZAWA
  0 siblings, 0 replies; only message in thread
From: Hiroyuki KAMEZAWA @ 2004-08-21  2:38 UTC (permalink / raw)
  To: linux-mm; +Cc: LHMS

[-- Attachment #1: Type: text/plain, Size: 144 bytes --]

This part is for alloc_pages()



-- 
--the clue is these footmarks leading to the door.--
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>



[-- Attachment #2: eliminate-bitmap-p03.patch --]
[-- Type: text/x-patch, Size: 1476 bytes --]


removing bitmap operation in page allocation.


---

 linux-2.6.8.1-kame-kamezawa/mm/page_alloc.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff -puN mm/page_alloc.c~eliminate-bitmap-p03 mm/page_alloc.c
--- linux-2.6.8.1-kame/mm/page_alloc.c~eliminate-bitmap-p03	2004-08-21 08:54:43.285765800 +0900
+++ linux-2.6.8.1-kame-kamezawa/mm/page_alloc.c	2004-08-21 08:54:43.292764736 +0900
@@ -287,8 +287,6 @@ void __free_pages_ok(struct page *page, 
 	free_pages_bulk(page_zone(page), 1, &list, order);
 }
 
-#define MARK_USED(index, order, area) \
-	__change_bit((index) >> (1+(order)), (area)->map)
 
 /*
  * The order of subdivision here is critical for the IO subsystem.
@@ -315,9 +313,10 @@ expand(struct zone *zone, struct page *p
 		high--;
 		size >>= 1;
 		BUG_ON(bad_range(zone, &page[size]));
+		set_page_order(&page[size],high);
 		list_add(&page[size].lru, &area->free_list);
-		MARK_USED(index + size, high, area);
 	}
+	invalidate_page_order(page);
 	return page;
 }
 
@@ -378,12 +377,9 @@ static struct page *__rmqueue(struct zon
 		area = zone->free_area + current_order;
 		if (list_empty(&area->free_list))
 			continue;
-
 		page = list_entry(area->free_list.next, struct page, lru);
 		list_del(&page->lru);
 		index = page - zone->zone_mem_map;
-		if (current_order != MAX_ORDER-1)
-			MARK_USED(index, current_order, area);
 		zone->free_pages -= 1UL << order;
 		return expand(zone, page, index, order, current_order, area);
 	}

_

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-08-21  2:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-21  2:38 [RFC] free_area[] bitmap elimination [2/3] Hiroyuki KAMEZAWA

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