From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Mel Gorman <mgorman@suse.de>, Rik van Riel <riel@redhat.com>,
David Rientjes <rientjes@google.com>,
Minchan Kim <minchan@kernel.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH v3 5/7] mm/compaction: respect compaction order when updating defer counter
Date: Mon, 7 Dec 2015 17:04:07 +0900 [thread overview]
Message-ID: <20151207080407.GD27292@js1304-P5Q-DELUXE> (raw)
In-Reply-To: <5661CA16.9010304@suse.cz>
On Fri, Dec 04, 2015 at 06:15:02PM +0100, Vlastimil Babka wrote:
> On 12/03/2015 08:11 AM, Joonsoo Kim wrote:
> >It doesn't make sense that we reset defer counter
> >in compaction_defer_reset() when compaction request under the order of
> >compact_order_failed succeed. Fix it.
>
> Right.
>
> >And, it does make sense that giving enough chance for updated failed
> >order compaction before deferring. Change it.
>
> Sorry, can't understand the meaning here. From the code it seems
> that you want to reset defer_shift to 0 instead of increasing it,
> when the current order is lower than the failed one? That makes
> sense, yeah.
You correctly understand my intention. :)
> How about this?
>
> "On the other hand, when deferring compaction for an order lower
> than the current compact_order_failed, we can assume the lower order
> will recover more quickly, so we should reset the progress made
> previously on compact_defer_shift with the higher order."
Will add it.
>
> >Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
>
> Acked-by: Vlastimil Babka <vbabka@suse.cz>
Thanks.
>
> >---
> > mm/compaction.c | 19 +++++++++++--------
> > 1 file changed, 11 insertions(+), 8 deletions(-)
> >
> >diff --git a/mm/compaction.c b/mm/compaction.c
> >index 67b8d90..1a75a6e 100644
> >--- a/mm/compaction.c
> >+++ b/mm/compaction.c
> >@@ -126,11 +126,14 @@ static struct page *pageblock_pfn_to_page(unsigned long start_pfn,
> > */
> > static void defer_compaction(struct zone *zone, int order)
> > {
> >- zone->compact_considered = 0;
> >- zone->compact_defer_shift++;
> >-
> >- if (order < zone->compact_order_failed)
> >+ if (order < zone->compact_order_failed) {
> >+ zone->compact_considered = 0;
> >+ zone->compact_defer_shift = 0;
> > zone->compact_order_failed = order;
> >+ } else {
> >+ zone->compact_considered = 0;
> >+ zone->compact_defer_shift++;
> >+ }
> >
> > if (zone->compact_defer_shift > COMPACT_MAX_DEFER_SHIFT)
> > zone->compact_defer_shift = COMPACT_MAX_DEFER_SHIFT;
> >@@ -161,11 +164,11 @@ bool compaction_deferred(struct zone *zone, int order)
> > /* Update defer tracking counters after successful compaction of given order */
> > static void compaction_defer_reset(struct zone *zone, int order)
> > {
> >- zone->compact_considered = 0;
> >- zone->compact_defer_shift = 0;
> >-
> >- if (order >= zone->compact_order_failed)
> >+ if (order >= zone->compact_order_failed) {
> >+ zone->compact_considered = 0;
> >+ zone->compact_defer_shift = 0;
> > zone->compact_order_failed = order + 1;
> >+ }
> >
> > trace_mm_compaction_defer_reset(zone, order);
> > }
> >
>
> --
> 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>
--
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:[~2015-12-07 8:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-03 7:11 [PATCH v3 0/7] mm/compaction: redesign compaction: part1 Joonsoo Kim
2015-12-03 7:11 ` [PATCH v3 1/7] mm/compaction: skip useless pfn when updating cached pfn Joonsoo Kim
2015-12-03 10:36 ` Vlastimil Babka
2015-12-07 7:37 ` Joonsoo Kim
2015-12-03 7:11 ` [PATCH v3 2/7] mm/compaction: remove unused defer_compaction() in compaction.h Joonsoo Kim
2015-12-04 15:29 ` Vlastimil Babka
2015-12-03 7:11 ` [PATCH v3 3/7] mm/compaction: initialize compact_order_failed to MAX_ORDER Joonsoo Kim
2015-12-04 15:36 ` Vlastimil Babka
2015-12-03 7:11 ` [PATCH v3 4/7] mm/compaction: update defer counter when allocation is expected to succeed Joonsoo Kim
2015-12-04 16:52 ` Vlastimil Babka
2015-12-07 8:03 ` Joonsoo Kim
2015-12-03 7:11 ` [PATCH v3 5/7] mm/compaction: respect compaction order when updating defer counter Joonsoo Kim
2015-12-04 17:15 ` Vlastimil Babka
2015-12-07 8:04 ` Joonsoo Kim [this message]
2015-12-03 7:11 ` [PATCH v3 6/7] mm/compaction: introduce migration scan limit Joonsoo Kim
2015-12-14 9:34 ` Vlastimil Babka
2015-12-16 5:39 ` Joonsoo Kim
2015-12-03 7:11 ` [PATCH v3 7/7] mm/compaction: replace compaction deferring with compaction limit Joonsoo Kim
2015-12-14 9:55 ` Vlastimil Babka
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=20151207080407.GD27292@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=minchan@kernel.org \
--cc=riel@redhat.com \
--cc=rientjes@google.com \
--cc=vbabka@suse.cz \
/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