All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Joonsoo Kim <iamjoonsoo.kim@lge.com>, Mel Gorman <mgorman@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Johannes Weiner <hannes@cmpxchg.org>,
	Rik van Riel <riel@redhat.com>
Subject: Re: [PATCH 1/3] mm/page_alloc: don't break highest order freepage if steal
Date: Tue, 12 May 2015 09:57:00 +0200	[thread overview]
Message-ID: <5551B24C.7080801@suse.cz> (raw)
In-Reply-To: <20150427084257.GA13790@js1304-P5Q-DELUXE>

On 04/27/2015 10:42 AM, Joonsoo Kim wrote:
> On Mon, Apr 27, 2015 at 09:08:50AM +0100, Mel Gorman wrote:
>> On Mon, Apr 27, 2015 at 04:23:39PM +0900, Joonsoo Kim wrote:
>>> When we steal whole pageblock, we don't need to break highest order
>>> freepage. Perhaps, there is small order freepage so we can use it.
>>>
>>
>> The reason why the largest block is taken is to reduce the probability
>> there will be another fallback event in the near future. Early on, there
>> were a lot of tests conducted to measure the number of external fragmenting
>> events and take steps to reduce them. Stealing the largest highest order
>> freepage was one of those steps.
>
> Hello, Mel.
>
> Purpose of this patch is not "stop steal highest order freepage".
> Currently, in case of that we steal all freepage including highest
> order freepage in certain pageblock, we break highest order freepage and
> return it even if we have low order freepage that we immediately steal.
>
> For example,
>
> Pageblock A has 5 freepage (4 * order 0, 1 * order 3) and
> we try to steal all freepage on pageblock A.
>
> Withouth this patch, we move all freepage to requested migratetype
> buddy list and break order 3 freepage. Leftover is like as following.
>
> (5 * order 0, 1 * order 1, 1* order 2)
>
> With this patch, (3 * order 0, 1 * order 3) remains.
>
> I think that this is better than before because we still have high order
> page. Isn't it?

I agree that this should be better in some cases and shouldn't be worse 
in any case. Nice catch.

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

WARNING: multiple messages have this Message-ID (diff)
From: Vlastimil Babka <vbabka@suse.cz>
To: Joonsoo Kim <iamjoonsoo.kim@lge.com>, Mel Gorman <mgorman@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Johannes Weiner <hannes@cmpxchg.org>,
	Rik van Riel <riel@redhat.com>
Subject: Re: [PATCH 1/3] mm/page_alloc: don't break highest order freepage if steal
Date: Tue, 12 May 2015 09:57:00 +0200	[thread overview]
Message-ID: <5551B24C.7080801@suse.cz> (raw)
In-Reply-To: <20150427084257.GA13790@js1304-P5Q-DELUXE>

On 04/27/2015 10:42 AM, Joonsoo Kim wrote:
> On Mon, Apr 27, 2015 at 09:08:50AM +0100, Mel Gorman wrote:
>> On Mon, Apr 27, 2015 at 04:23:39PM +0900, Joonsoo Kim wrote:
>>> When we steal whole pageblock, we don't need to break highest order
>>> freepage. Perhaps, there is small order freepage so we can use it.
>>>
>>
>> The reason why the largest block is taken is to reduce the probability
>> there will be another fallback event in the near future. Early on, there
>> were a lot of tests conducted to measure the number of external fragmenting
>> events and take steps to reduce them. Stealing the largest highest order
>> freepage was one of those steps.
>
> Hello, Mel.
>
> Purpose of this patch is not "stop steal highest order freepage".
> Currently, in case of that we steal all freepage including highest
> order freepage in certain pageblock, we break highest order freepage and
> return it even if we have low order freepage that we immediately steal.
>
> For example,
>
> Pageblock A has 5 freepage (4 * order 0, 1 * order 3) and
> we try to steal all freepage on pageblock A.
>
> Withouth this patch, we move all freepage to requested migratetype
> buddy list and break order 3 freepage. Leftover is like as following.
>
> (5 * order 0, 1 * order 1, 1* order 2)
>
> With this patch, (3 * order 0, 1 * order 3) remains.
>
> I think that this is better than before because we still have high order
> page. Isn't it?

I agree that this should be better in some cases and shouldn't be worse 
in any case. Nice catch.

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


  reply	other threads:[~2015-05-12  7:57 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-27  7:23 [PATCH 1/3] mm/page_alloc: don't break highest order freepage if steal Joonsoo Kim
2015-04-27  7:23 ` Joonsoo Kim
2015-04-27  7:23 ` [PATCH 2/3] mm/page_alloc: stop fallback allocation if we already get some freepage Joonsoo Kim
2015-04-27  7:23   ` Joonsoo Kim
2015-05-12  8:36   ` Vlastimil Babka
2015-05-12  8:36     ` Vlastimil Babka
2015-05-19  7:47     ` Joonsoo Kim
2015-05-19  7:47       ` Joonsoo Kim
2015-04-27  7:23 ` [RFC PATCH 3/3] mm: support active anti-fragmentation algorithm Joonsoo Kim
2015-04-27  7:23   ` Joonsoo Kim
2015-04-27  8:29   ` Mel Gorman
2015-04-27  8:29     ` Mel Gorman
2015-04-28  7:45     ` Joonsoo Kim
2015-04-28  7:45       ` Joonsoo Kim
2015-05-12  9:01       ` Vlastimil Babka
2015-05-12  9:01         ` Vlastimil Babka
2015-05-19  8:04         ` Joonsoo Kim
2015-05-19  8:04           ` Joonsoo Kim
2015-04-27  8:08 ` [PATCH 1/3] mm/page_alloc: don't break highest order freepage if steal Mel Gorman
2015-04-27  8:08   ` Mel Gorman
2015-04-27  8:42   ` Joonsoo Kim
2015-04-27  8:42     ` Joonsoo Kim
2015-05-12  7:57     ` Vlastimil Babka [this message]
2015-05-12  7:57       ` Vlastimil Babka
2015-05-12  7:51 ` Vlastimil Babka
2015-05-12  7:51   ` Vlastimil Babka
2015-05-12  7:54   ` Vlastimil Babka
2015-05-12  7:54     ` Vlastimil Babka
2015-05-19  7:44     ` Joonsoo Kim
2015-05-19  7:44       ` Joonsoo Kim
2015-05-19  7:44   ` Joonsoo Kim
2015-05-19  7:44     ` 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=5551B24C.7080801@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=riel@redhat.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 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.