linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Huang Shijie <b32955@freescale.com>
To: Mel Gorman <mgorman@suse.de>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org, shijie8@gmail.com
Subject: Re: [PATCH v2] mm/compaction : fix the wrong return value for isolate_migratepages()
Date: Thu, 5 Jan 2012 18:31:14 +0800	[thread overview]
Message-ID: <4F057BF2.5040206@freescale.com> (raw)
In-Reply-To: <20120105101222.GD28031@suse.de>

hi,
> Why?
>
> Returning ISOLATE_SUCCESS means that we fall through. This means busy
> work in migrate_pages(), updating list accounting and the list. It's
> wasteful but is it functionally incorrect? What problem did you observe?
there may are many times the cc->migratepages is zero, but the return 
value is ISOLATE_SUCCESS.


> If this is simply a performance issue then minimally COMPACTBLOCKS
yes, My concern is the performance.

the comment of ISOLATE_NONE makes me confused.  :(

If you think we should update the COMPACTBLOCK in this case, my patch is 
wrong.


> still needs to be updated, we still want to see the tracepoint etc. To
ok.
> preserve that, I would suggest as an alternative to leave it returning
> ISOLATE_SUCCESS but move
>
>
>                 err = migrate_pages(&cc->migratepages, compaction_alloc,
>                                  (unsigned long)cc, false,
>                                  cc->sync ? MIGRATE_SYNC_LIGHT : MIGRATE_ASYNC);
>                  update_nr_listpages(cc);
>
> inside a if (nr_migrate) check to avoid some overhead.
>
thanks.
Huang Shijie


--
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>

  reply	other threads:[~2012-01-05 10:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-31  9:09 [PATCH v2] mm/compaction : fix the wrong return value for isolate_migratepages() Huang Shijie
2012-01-05 10:12 ` Mel Gorman
2012-01-05 10:31   ` Huang Shijie [this message]
2012-01-05 10:50     ` 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=4F057BF2.5040206@freescale.com \
    --to=b32955@freescale.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=shijie8@gmail.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;
as well as URLs for NNTP newsgroup(s).