From: Wu Fengguang <fengguang.wu@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Minchan Kim <minchan.kim@gmail.com>,
Christoph Lameter <cl@linux.com>, Hugh Dickins <hughd@google.com>,
Andi Kleen <andi@firstfloor.org>, Mel Gorman <mel@csn.ul.ie>,
linux-mm <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RESEND PATCH v2] compaction: fix COMPACTPAGEFAILED counting
Date: Sat, 4 Sep 2010 10:04:53 +0800 [thread overview]
Message-ID: <20100904020452.GA7788@localhost> (raw)
In-Reply-To: <20100903170227.b2f18ba4.akpm@linux-foundation.org>
On Sat, Sep 04, 2010 at 08:02:27AM +0800, Andrew Morton wrote:
> On Thu, 2 Sep 2010 23:34:47 +0900
> Minchan Kim <minchan.kim@gmail.com> wrote:
>
> > Now update_nr_listpages doesn't have a role. That's because
> > lists passed is always empty just after calling migrate_pages.
> > The migrate_pages cleans up page list which have failed to migrate
> > before returning by aaa994b3.
> >
> > [PATCH] page migration: handle freeing of pages in migrate_pages()
> >
> > Do not leave pages on the lists passed to migrate_pages(). Seems that we will
> > not need any postprocessing of pages. This will simplify the handling of
> > pages by the callers of migrate_pages().
> >
> > At that time, we thought we don't need any postprocessing of pages.
> > But the situation is changed. The compaction need to know the number of
> > failed to migrate for COMPACTPAGEFAILED stat
> >
> > This patch makes new rule for caller of migrate_pages to call putback_lru_pages.
> > So caller need to clean up the lists so it has a chance to postprocess the pages.
> > [suggested by Christoph Lameter]
>
> I'm having trouble predicting what the user-visible effects of this bug
> might be. Just an inaccuracy in the COMPACTPAGEFAILED vm event?
Right, it's an accounting fix. Before patch COMPACTPAGEFAILED will
remain 0 regardless of how many migration failures.
The patch does slightly add dependency for migrate_pages() to return
error code properly. Before patch, migrate_pages() calls
putback_lru_pages() regardless of the error code. After patch, the
migrate_pages() callers will check its return value before calling
putback_lru_pages().
In current code, the two conditions do seem to match:
"some pages remained in the *from list" == "migrate_pages() returns an error code".
Thanks,
Fengguang
--
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:[~2010-09-04 2:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-02 14:34 [RESEND PATCH v2] compaction: fix COMPACTPAGEFAILED counting Minchan Kim
2010-09-04 0:02 ` Andrew Morton
2010-09-04 2:04 ` Wu Fengguang [this message]
2010-09-05 2:51 ` Minchan Kim
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=20100904020452.GA7788@localhost \
--to=fengguang.wu@intel.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=cl@linux.com \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--cc=minchan.kim@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).