From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758257AbbLCELv (ORCPT ); Wed, 2 Dec 2015 23:11:51 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:33134 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754103AbbLCELt (ORCPT ); Wed, 2 Dec 2015 23:11:49 -0500 From: Joonsoo Kim X-Google-Original-From: Joonsoo Kim To: Andrew Morton Cc: Vlastimil Babka , Mel Gorman , David Rientjes , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Joonsoo Kim Subject: [PATCH] mm/compaction: restore COMPACT_CLUSTER_MAX to 32 Date: Thu, 3 Dec 2015 13:11:40 +0900 Message-Id: <1449115900-20112-1-git-send-email-iamjoonsoo.kim@lge.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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. Signed-off-by: Joonsoo Kim --- include/linux/swap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/swap.h b/include/linux/swap.h index d08feef..31eb343 100644 --- 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 -- 1.9.1