[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090713113326.624F.A69D9226@jp.fujitsu.com>
Date: Mon, 13 Jul 2009 11:47:46 +0900 (JST)
From: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To: Shaohua Li <shaohua.li@...el.com>
Cc: kosaki.motohiro@...fujitsu.com, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, mel@....ul.ie, akpm@...ux-foundation.org
Subject: Re: [PATCH] switch free memory back to MIGRATE_MOVABLE
> When page is back to buddy and its order is bigger than pageblock_order, we can
> switch its type to MIGRATE_MOVABLE. This can reduce fragmentation. The patch
> has obvious effect when read a block device and then drop caches.
>
> Signed-off-by: Shaohua Li <shaohua.li@...el.com>
This patch change hot path, but there is no performance mesurement description.
Also, I don't like modification buddy core for only drop caches.
> ---
> mm/page_alloc.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> Index: linux/mm/page_alloc.c
> ===================================================================
> --- linux.orig/mm/page_alloc.c 2009-07-10 11:36:07.000000000 +0800
> +++ linux/mm/page_alloc.c 2009-07-13 09:25:21.000000000 +0800
> @@ -475,6 +475,15 @@ static inline void __free_one_page(struc
> order++;
> }
> set_page_order(page, order);
> +
> + if (order >= pageblock_order && migratetype != MIGRATE_MOVABLE) {
> + int i;
> +
> + migratetype = MIGRATE_MOVABLE;
> + for (i = 0; i < (1 << (order - pageblock_order)); i++)
> + set_pageblock_migratetype(page +
> + i * pageblock_nr_pages, MIGRATE_MOVABLE);
> + }
> list_add(&page->lru,
> &zone->free_area[order].free_list[migratetype]);
> zone->free_area[order].nr_free++;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists