From: Mel Gorman <mgorman@suse.de>
To: Minchan Kim <minchan@kernel.org>
Cc: Huang Shijie <b32955@freescale.com>,
akpm@linux-foundation.org, linux-mm@kvack.org
Subject: Re: [PATCH v2] mm/compaction : do optimazition when the migration scanner gets no page
Date: Fri, 13 Jan 2012 10:48:56 +0000 [thread overview]
Message-ID: <20120113104856.GQ4118@suse.de> (raw)
In-Reply-To: <20120113035037.GA10924@barrios-desktop.redhat.com>
On Fri, Jan 13, 2012 at 12:50:37PM +0900, Minchan Kim wrote:
>
> Okay. If you want it really, How about this?
> Why I insist on is I don't want to change ISOLATE_NONE's semantic.
> It's very clear and readable.
> We should change code itself instead of semantic of ISOLATE_NONE.
>
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -376,7 +376,7 @@ static isolate_migrate_t isolate_migratepages(struct zone *zone,
>
> trace_mm_compaction_isolate_migratepages(nr_scanned, nr_isolated);
>
> - return ISOLATE_SUCCESS;
> + return cc->nr_migratepages ? ISOLATE_SUCCESS : ISOLATE_NONE;
> }
>
> /*
> @@ -547,6 +547,12 @@ static int compact_zone(struct zone *zone, struct compact_control *cc)
> ret = COMPACT_PARTIAL;
> goto out;
> case ISOLATE_NONE:
> + /*
> + * If we can't isolate pages at all, we want to
> + * trace, still.
> + */
> + count_vm_event(COMPACTBLOCKS);
> + trace_mm_compaction_migratepages(0, 0);
> continue;
> case ISOLATE_SUCCESS:
> ;
>
This will increment COMPACTBLOCKS and trigger the tracepoint even
when no scanning took place. It only happens with the migration and free
scanner meet so once per full compaction cycle which should be a rare
case. That should be fine.
--
Mel Gorman
SUSE Labs
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-01-13 10:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-12 5:47 [PATCH v2] mm/compaction : do optimazition when the migration scanner gets no page Huang Shijie
2012-01-12 8:03 ` Minchan Kim
2012-01-12 8:26 ` Huang Shijie
2012-01-12 8:32 ` Minchan Kim
2012-01-12 8:38 ` Huang Shijie
2012-01-12 11:48 ` Mel Gorman
2012-01-13 0:50 ` Minchan Kim
2012-01-13 2:35 ` Huang Shijie
2012-01-13 3:12 ` Minchan Kim
2012-01-13 3:31 ` Huang Shijie
2012-01-13 3:50 ` Minchan Kim
2012-01-13 10:48 ` Mel Gorman [this message]
2012-01-13 10:34 ` 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=20120113104856.GQ4118@suse.de \
--to=mgorman@suse.de \
--cc=akpm@linux-foundation.org \
--cc=b32955@freescale.com \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.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;
as well as URLs for NNTP newsgroup(s).