Received: by 10.192.165.148 with SMTP id m20csp5255140imm; Wed, 9 May 2018 01:54:33 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqpLGdy1cVkpnLJ7x0DSkX9m6EBm8ZEFNWIFZZgL6sOgNXW6ViL9TcJn9jN5n4Xol2IKGbD X-Received: by 2002:a65:4102:: with SMTP id w2-v6mr34336105pgp.31.1525856073599; Wed, 09 May 2018 01:54:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525856073; cv=none; d=google.com; s=arc-20160816; b=PKEdQg1dXkZOz3FQNbYgvkp5v39B69IYz79diQjYt8IF8cZ6i+Ts4378Rtk9hLGs1J CL19kGI+ruTakuBouv2FmIzUqAf8TejO6aSO2Xck0Y6bXkLB6LGV113VGaEDHtJ1crHk KIXexGL6mtMNS9CWTDFuSySrI+ECYEu+UXctLcbdHL6NLpV6a4kFSnXWuP2kxvgk+TOC 41I9jZTR9gBIWHad1DWgg1gAJwhhQi0hSJL4XyQQkKNJ9DV2hVpyb3VTGM2koUDoZ7CM ggjk1ASLh5oIhCHcL5xve+w86PGrZhAjhSPo2yftvhxIsL3PvR6NxgLXql55IlDb4F5C KeGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=W2eHiyd8AlflS8Wp1FzNkWsH9oQoACnDauB/NeNrwJo=; b=CqSNeUpvjxu4jVx0hMI3CCOTO3VnA+D7N4mIXlfZZCQPLqJD0wO+MfOWVk00ri2VQr m7I7+1+/dxzc2Vw+Cv+HfhcM0/wiaVr/lYPqiVu33KmBV5RunpZETa2jBuUGLFgOw1JK 5ujUOJ1i9VpeFfuCdcK0SFJgxutCwV9BNvCv0sPsdE4593giS6bYeyk/wHifPKA5jX69 dd4dzGqQ3M1pS8lyCtel5nIBjjFiHv1Ag+sGo5SDDLvFJcdcvgRLhevN7W02yaLjuXWX jz3CjnS9QyHFj3ta+lemNgNEtLp0i21ru0YPg3FsabowiPF2pDu5LLh8DL4c3TcPQi4/ xu3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w64si17787658pfw.201.2018.05.09.01.54.19; Wed, 09 May 2018 01:54:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934352AbeEIIxv (ORCPT + 99 others); Wed, 9 May 2018 04:53:51 -0400 Received: from mga03.intel.com ([134.134.136.65]:31335 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934141AbeEIIxi (ORCPT ); Wed, 9 May 2018 04:53:38 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2018 01:53:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,381,1520924400"; d="scan'208";a="227055183" Received: from aaronlu.sh.intel.com ([10.239.159.135]) by fmsmga006.fm.intel.com with ESMTP; 09 May 2018 01:53:35 -0700 From: Aaron Lu To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Andrew Morton , Huang Ying , Dave Hansen , Kemi Wang , Tim Chen , Andi Kleen , Michal Hocko , Vlastimil Babka , Mel Gorman , Matthew Wilcox , Daniel Jordan , Tariq Toukan Subject: [RFC v3 PATCH 5/5] mm/can_skip_merge(): make it more aggressive to attempt cluster alloc/free Date: Wed, 9 May 2018 16:54:50 +0800 Message-Id: <20180509085450.3524-6-aaron.lu@intel.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180509085450.3524-1-aaron.lu@intel.com> References: <20180509085450.3524-1-aaron.lu@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After system runs a long time, it's easy for a zone to have no suitable high order page available and that will stop cluster alloc and free in current implementation due to compact_considered > 0. To make it favour order0 alloc/free, relax the condition to only disallow cluster alloc/free when problem would occur, e.g. when compaction is in progress. Signed-off-by: Aaron Lu --- mm/internal.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mm/internal.h b/mm/internal.h index e3f209f8fb39..521aa4d8f3c1 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -552,10 +552,6 @@ void try_to_merge_page(struct page *page); #ifdef CONFIG_COMPACTION static inline bool can_skip_merge(struct zone *zone, int order) { - /* Compaction has failed in this zone, we shouldn't skip merging */ - if (zone->compact_considered) - return false; - /* Only consider no_merge for order 0 pages */ if (order) return false; -- 2.14.3