From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Shaohua Li <shaohua.li@intel.com>
Cc: kosaki.motohiro@jp.fujitsu.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, mel@csn.ul.ie, akpm@linux-foundation.org
Subject: Re: [PATCH] switch free memory back to MIGRATE_MOVABLE
Date: Mon, 13 Jul 2009 11:47:46 +0900 (JST) [thread overview]
Message-ID: <20090713113326.624F.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <20090713023030.GA27269@sli10-desk.sh.intel.com>
> 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@intel.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@vger.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, 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>
next prev parent reply other threads:[~2009-07-13 2:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-13 2:30 Shaohua Li
2009-07-13 2:47 ` KOSAKI Motohiro [this message]
2009-07-13 2:58 ` KAMEZAWA Hiroyuki
2009-07-13 3:04 ` Shaohua Li
2009-07-13 3:07 ` KAMEZAWA Hiroyuki
2009-07-13 3:08 ` KOSAKI Motohiro
2009-07-13 3:18 ` Shaohua Li
2009-07-13 5:38 ` KAMEZAWA Hiroyuki
2009-07-13 9:56 ` Mel Gorman
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=20090713113326.624F.A69D9226@jp.fujitsu.com \
--to=kosaki.motohiro@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--cc=shaohua.li@intel.com \
/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