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:34:27 +0000 [thread overview]
Message-ID: <20120113103427.GP4118@suse.de> (raw)
In-Reply-To: <20120113005026.GA2614@barrios-desktop.redhat.com>
On Fri, Jan 13, 2012 at 09:50:42AM +0900, Minchan Kim wrote:
> > > Hmm, I don't like this change.
> > > ISOLATE_NONE mean "we don't isolate any page at all"
> > > ISOLATE_SUCCESS mean "We isolaetssome pages"
> > > It's very clear but you are changing semantic slighly.
> > >
> >
> > That is somewhat the point of his patch - isolate_migratepages()
> > can return ISOLATE_SUCCESS even though no pages were isolated. Note that
>
> That's what I don't like part.
> Why should we return ISOLATE_SUCESS although we didn't isolate any page?
Because the scan took place. ISOLATE_NONE is returned when no scanning
took place. ISOLATE_SUCCESS is returned when some scanning took place.
BEcause of async compaction, the scan might only be 1 page but
it's still a scan. It's easy to distinguish using the tracepoint
if necessary.
> Of course, comment can say that but I want to clear code itself than comment.
>
Yes.
> > <SNIP>
> >
> > It could easily be argued that if we skip over !MIGRATE_MOVABLE
> > pageblocks then we should not account for that in COMPACTBLOCKS either
> > because the scanning was minimal. In that case we would change this
> >
> > /*
> > * For async migration, also only scan in MOVABLE blocks. Async
> > * migration is optimistic to see if the minimum amount of work
> > * satisfies the allocation
> > */
> > pageblock_nr = low_pfn >> pageblock_order;
> > if (!cc->sync && last_pageblock_nr != pageblock_nr &&
> > get_pageblock_migratetype(page) != MIGRATE_MOVABLE) {
> > low_pfn += pageblock_nr_pages;
> > low_pfn = ALIGN(low_pfn, pageblock_nr_pages) - 1;
> > last_pageblock_nr = pageblock_nr;
> > continue;
> > }
> >
> > to return ISOLATE_NONE there instead of continue. I would be ok making
> > that part of this patch to clarify the difference between ISOLATE_NONE
> > and ISOLATE_SUCCESS and what it means for accounting.
>
> I think simple patch is returning "return cc->nr_migratepages ? ISOLATE_SUCCESS : ISOLATE_NONE;"
> It's very clear and readable, I think.
> In this patch, what's the problem you think?
>
The trace point and accounting is missed and that information is useful.
--
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>
prev parent reply other threads:[~2012-01-13 10:34 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
2012-01-13 10:34 ` Mel Gorman [this message]
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=20120113103427.GP4118@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).