All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Joonsoo Kim <js1304@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: 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,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH v2 1/4] mm/compaction: fix wrong order check in compact_finished()
Date: Fri, 30 Jan 2015 14:27:15 +0100	[thread overview]
Message-ID: <54CB86B3.1060500@suse.cz> (raw)
In-Reply-To: <1422621252-29859-2-git-send-email-iamjoonsoo.kim@lge.com>

On 01/30/2015 01:34 PM, Joonsoo Kim wrote:
> What we want to check here is whether there is highorder freepage
> in buddy list of other migratetype in order to steal it without
> fragmentation. But, current code just checks cc->order which means
> allocation request order. So, this is wrong.

The bug has been introduced by 1fb3f8ca0e92 ("mm: compaction: capture a suitable
high-order page immediately when it is made available") and survived the later
partial revert 8fb74b9fb2b1.

> Without this fix, non-movable synchronous compaction below pageblock order
> would not stopped until compaction is complete, because migratetype of most
> pageblocks are movable and high order freepage made by compaction is usually
> on movable type buddy list.
> 
> There is some report related to this bug. See below link.
> 
> http://www.spinics.net/lists/linux-mm/msg81666.html
> 
> Although the issued system still has load spike comes from compaction,
> this makes that system completely stable and responsive according to
> his report.
> 
> stress-highalloc test in mmtests with non movable order 7 allocation doesn't
> show any notable difference in allocation success rate, but, it shows more
> compaction success rate.
> 
> Compaction success rate (Compaction success * 100 / Compaction stalls, %)
> 18.47 : 28.94
> 
> Cc: <stable@vger.kernel.org>

# v3.7+
Fixes: 1fb3f8ca0e9222535a39b884cb67a34628411b9f

> Acked-by: Vlastimil Babka <vbabka@suse.cz>
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>

Thanks.

> ---
>  mm/compaction.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/compaction.c b/mm/compaction.c
> index b68736c..4954e19 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -1173,7 +1173,7 @@ static int __compact_finished(struct zone *zone, struct compact_control *cc,
>  			return COMPACT_PARTIAL;
>  
>  		/* Job done if allocation would set block type */
> -		if (cc->order >= pageblock_order && area->nr_free)
> +		if (order >= pageblock_order && area->nr_free)
>  			return COMPACT_PARTIAL;
>  	}
>  
> 

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

WARNING: multiple messages have this Message-ID (diff)
From: Vlastimil Babka <vbabka@suse.cz>
To: Joonsoo Kim <js1304@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: 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,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH v2 1/4] mm/compaction: fix wrong order check in compact_finished()
Date: Fri, 30 Jan 2015 14:27:15 +0100	[thread overview]
Message-ID: <54CB86B3.1060500@suse.cz> (raw)
In-Reply-To: <1422621252-29859-2-git-send-email-iamjoonsoo.kim@lge.com>

On 01/30/2015 01:34 PM, Joonsoo Kim wrote:
> What we want to check here is whether there is highorder freepage
> in buddy list of other migratetype in order to steal it without
> fragmentation. But, current code just checks cc->order which means
> allocation request order. So, this is wrong.

The bug has been introduced by 1fb3f8ca0e92 ("mm: compaction: capture a suitable
high-order page immediately when it is made available") and survived the later
partial revert 8fb74b9fb2b1.

> Without this fix, non-movable synchronous compaction below pageblock order
> would not stopped until compaction is complete, because migratetype of most
> pageblocks are movable and high order freepage made by compaction is usually
> on movable type buddy list.
> 
> There is some report related to this bug. See below link.
> 
> http://www.spinics.net/lists/linux-mm/msg81666.html
> 
> Although the issued system still has load spike comes from compaction,
> this makes that system completely stable and responsive according to
> his report.
> 
> stress-highalloc test in mmtests with non movable order 7 allocation doesn't
> show any notable difference in allocation success rate, but, it shows more
> compaction success rate.
> 
> Compaction success rate (Compaction success * 100 / Compaction stalls, %)
> 18.47 : 28.94
> 
> Cc: <stable@vger.kernel.org>

# v3.7+
Fixes: 1fb3f8ca0e9222535a39b884cb67a34628411b9f

> Acked-by: Vlastimil Babka <vbabka@suse.cz>
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>

Thanks.

> ---
>  mm/compaction.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/compaction.c b/mm/compaction.c
> index b68736c..4954e19 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -1173,7 +1173,7 @@ static int __compact_finished(struct zone *zone, struct compact_control *cc,
>  			return COMPACT_PARTIAL;
>  
>  		/* Job done if allocation would set block type */
> -		if (cc->order >= pageblock_order && area->nr_free)
> +		if (order >= pageblock_order && area->nr_free)
>  			return COMPACT_PARTIAL;
>  	}
>  
> 


  reply	other threads:[~2015-01-30 13:27 UTC|newest]

Thread overview: 39+ 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 ` 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 12:34   ` Joonsoo Kim
2015-01-30 12:34   ` Joonsoo Kim
2015-01-30 13:27   ` Vlastimil Babka [this message]
2015-01-30 13:27     ` Vlastimil Babka
2015-01-31  7:38   ` Zhang Yanfei
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 12:34   ` Joonsoo Kim
2015-01-30 13:47   ` Vlastimil Babka
2015-01-30 13:47     ` Vlastimil Babka
2015-01-31  7:49   ` Zhang Yanfei
2015-01-31  7:49     ` Zhang Yanfei
2015-01-31  8:31     ` Vlastimil Babka
2015-01-31  8:31       ` Vlastimil Babka
2015-01-31 10:17       ` Zhang Yanfei
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 12:34   ` Joonsoo Kim
2015-01-30 14:27   ` Vlastimil Babka
2015-01-30 14:27     ` Vlastimil Babka
2015-02-02  7:02     ` Joonsoo Kim
2015-02-02  7:02       ` Joonsoo Kim
2015-01-31 12:38   ` Zhang Yanfei
2015-01-31 12:38     ` Zhang Yanfei
2015-02-02  7:03     ` Joonsoo Kim
2015-02-02  7:03       ` Joonsoo Kim
2015-01-30 12:34 ` [PATCH v2 4/4] mm/compaction: enhance compaction finish condition Joonsoo Kim
2015-01-30 12:34   ` Joonsoo Kim
2015-01-30 14:43   ` Vlastimil Babka
2015-01-30 14:43     ` Vlastimil Babka
2015-02-02  7:11     ` Joonsoo Kim
2015-02-02  7:11       ` Joonsoo Kim
2015-01-31 15:58   ` Zhang Yanfei
2015-01-31 15:58     ` Zhang Yanfei
2015-02-02  7:12     ` Joonsoo Kim
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=54CB86B3.1060500@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=js1304@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=riel@redhat.com \
    --cc=rientjes@google.com \
    --cc=stable@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.