linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hiroyuki KAMEZAWA <kamezawa.hiroyu@jp.fujitsu.com>
To: linux-mm <linux-mm@kvack.org>
Cc: LHMS <lhms-devel@lists.sourceforge.net>
Subject: [RFC] free_area[] bitmap elimination [2/3]
Date: Sat, 21 Aug 2004 11:38:05 +0900	[thread overview]
Message-ID: <4126B58D.8080004@jp.fujitsu.com> (raw)

[-- 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);
 	}

_

                 reply	other threads:[~2004-08-21  2:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4126B58D.8080004@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=lhms-devel@lists.sourceforge.net \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox