From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
To: Zhang Yanfei <zhangyanfei.ok@hotmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Vlastimil Babka <vbabka@suse.cz>, Mel Gorman <mgorman@suse.de>,
David Rientjes <rientjes@google.com>,
Rik van Riel <riel@redhat.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/4] mm/page_alloc: separate steal decision from steal behaviour part
Date: Mon, 2 Feb 2015 16:03:21 +0900 [thread overview]
Message-ID: <20150202070321.GB6488@js1304-P5Q-DELUXE> (raw)
In-Reply-To: <BLU436-SMTP21184383897546B937E3C68833E0@phx.gbl>
On Sat, Jan 31, 2015 at 08:38:10PM +0800, Zhang Yanfei wrote:
> At 2015/1/30 20:34, Joonsoo Kim wrote:
> > From: Joonsoo <iamjoonsoo.kim@lge.com>
> >
> > This is preparation step to use page allocator's anti fragmentation logic
> > in compaction. This patch just separates steal decision part from actual
> > steal behaviour part so there is no functional change.
> >
> > Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> > ---
> > mm/page_alloc.c | 49 ++++++++++++++++++++++++++++++++-----------------
> > 1 file changed, 32 insertions(+), 17 deletions(-)
> >
> > diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> > index 8d52ab1..ef74750 100644
> > --- a/mm/page_alloc.c
> > +++ b/mm/page_alloc.c
> > @@ -1122,6 +1122,24 @@ static void change_pageblock_range(struct page *pageblock_page,
> > }
> > }
> >
> > +static bool can_steal_freepages(unsigned int order,
> > + int start_mt, int fallback_mt)
> > +{
> > + if (is_migrate_cma(fallback_mt))
> > + return false;
> > +
> > + if (order >= pageblock_order)
> > + return true;
> > +
> > + if (order >= pageblock_order / 2 ||
> > + start_mt == MIGRATE_RECLAIMABLE ||
> > + start_mt == MIGRATE_UNMOVABLE ||
> > + page_group_by_mobility_disabled)
> > + return true;
> > +
> > + return false;
> > +}
>
> So some comments which can tell the cases can or cannot steal freepages
> from other migratetype is necessary IMHO. Actually we can just
> move some comments in try_to_steal_pages to here.
Yes, move some comments looks sufficient to me. I will fix it.
Thanks.
next prev parent reply other threads:[~2015-02-02 7:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-30 12:34 [PATCH v2 0/4] enhance compaction success rate Joonsoo Kim
2015-01-30 12:34 ` [PATCH v2 1/4] mm/compaction: fix wrong order check in compact_finished() Joonsoo Kim
2015-01-30 13:27 ` Vlastimil Babka
2015-01-31 7:38 ` Zhang Yanfei
2015-01-30 12:34 ` [PATCH v2 2/4] mm/compaction: stop the isolation when we isolate enough freepage Joonsoo Kim
2015-01-30 13:47 ` Vlastimil Babka
2015-01-31 7:49 ` Zhang Yanfei
2015-01-31 8:31 ` Vlastimil Babka
2015-01-31 10:17 ` Zhang Yanfei
2015-01-30 12:34 ` [PATCH v2 3/4] mm/page_alloc: separate steal decision from steal behaviour part Joonsoo Kim
2015-01-30 14:27 ` Vlastimil Babka
2015-02-02 7:02 ` Joonsoo Kim
2015-01-31 12:38 ` Zhang Yanfei
2015-02-02 7:03 ` Joonsoo Kim [this message]
2015-01-30 12:34 ` [PATCH v2 4/4] mm/compaction: enhance compaction finish condition Joonsoo Kim
2015-01-30 14:43 ` Vlastimil Babka
2015-02-02 7:11 ` Joonsoo Kim
2015-01-31 15:58 ` Zhang Yanfei
2015-02-02 7:12 ` Joonsoo 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=20150202070321.GB6488@js1304-P5Q-DELUXE \
--to=iamjoonsoo.kim@lge.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=riel@redhat.com \
--cc=rientjes@google.com \
--cc=vbabka@suse.cz \
--cc=zhangyanfei.ok@hotmail.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).