* Optimize free_one_page
@ 2006-08-19 3:31 Christoph Lameter
0 siblings, 0 replies; only message in thread
From: Christoph Lameter @ 2006-08-19 3:31 UTC (permalink / raw)
To: akpm; +Cc: linux-mm
Free one_page currently adds the page to a fake list and calls
free_page_bulk. Fee_page_bulk takes it off again and then calles
__free_one_page.
Make free_one_page go directly to __free_one_page. Saves
list on / off and a temporary list in free_one_page for
higher ordered pages.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Index: linux-2.6.18-rc4/mm/page_alloc.c
===================================================================
--- linux-2.6.18-rc4.orig/mm/page_alloc.c 2006-08-18 14:52:29.451028823 -0700
+++ linux-2.6.18-rc4/mm/page_alloc.c 2006-08-18 14:52:35.046386459 -0700
@@ -432,9 +432,11 @@ static void free_pages_bulk(struct zone
static void free_one_page(struct zone *zone, struct page *page, int order)
{
- LIST_HEAD(list);
- list_add(&page->lru, &list);
- free_pages_bulk(zone, 1, &list, order);
+ spin_lock(&zone->lock);
+ zone->all_unreclaimable = 0;
+ zone->pages_scanned = 0;
+ __free_one_page(page, zone ,order);
+ spin_unlock(&zone->lock);
}
static void __free_pages_ok(struct page *page, unsigned int order)
--
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:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-08-19 3:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-19 3:31 Optimize free_one_page Christoph Lameter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox