linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Joonsoo Kim <js1304@gmail.com>
Cc: Vlastimil Babka <vbabka@suse.cz>, Mel Gorman <mgorman@suse.de>,
	David Rientjes <rientjes@google.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>
Subject: Re: [PATCH] mm/compaction: restore COMPACT_CLUSTER_MAX to 32
Date: Mon, 7 Dec 2015 17:00:41 -0800	[thread overview]
Message-ID: <20151207170041.c470d362915ae1b42a8a4ef8@linux-foundation.org> (raw)
In-Reply-To: <1449115900-20112-1-git-send-email-iamjoonsoo.kim@lge.com>

On Thu,  3 Dec 2015 13:11:40 +0900 Joonsoo Kim <js1304@gmail.com> wrote:

> Until now, COMPACT_CLUSTER_MAX is defined as SWAP_CLUSTER_MAX.
> Commit ("mm: increase SWAP_CLUSTER_MAX to batch TLB flushes")
> changes SWAP_CLUSTER_MAX from 32 to 256 to improve tlb flush performance
> so COMPACT_CLUSTER_MAX is also changed to 256.

"mm: increase SWAP_CLUSTER_MAX to batch TLB flushes" has been in limbo
for quite a while.  Because it has been unclear whether the patch's
benefits exceed its costs+risks.

We should make a decision here - either do the appropriate testing or
drop the patch.


> But, it has
> no justification on compaction-side and I think that loss is more than
> benefit.
> 
> One example is that migration scanner would isolates and migrates
> too many pages unnecessarily with 256 COMPACT_CLUSTER_MAX. It may be
> enough to migrate 4 pages in order to make order-2 page, but, now,
> compaction will migrate 256 pages.
> 
> To reduce this unneeded overhead, this patch restores
> COMPACT_CLUSTER_MAX to 32.
> 
> ...
>
> --- a/include/linux/swap.h
> +++ b/include/linux/swap.h
> @@ -155,7 +155,7 @@ enum {
>  };
>  
>  #define SWAP_CLUSTER_MAX 256UL
> -#define COMPACT_CLUSTER_MAX SWAP_CLUSTER_MAX
> +#define COMPACT_CLUSTER_MAX 32UL
>  
>  /*
>   * Ratio between zone->managed_pages and the "gap" that above the per-zone

--
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-12-08  1:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-03  4:11 [PATCH] mm/compaction: restore COMPACT_CLUSTER_MAX to 32 Joonsoo Kim
2015-12-08  1:00 ` Andrew Morton [this message]
2015-12-08  9:45   ` Mel Gorman

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=20151207170041.c470d362915ae1b42a8a4ef8@linux-foundation.org \
    --to=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=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;
as well as URLs for NNTP newsgroup(s).