Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp293849imm; Tue, 16 Oct 2018 23:35:44 -0700 (PDT) X-Google-Smtp-Source: ACcGV61hoEb1SW68RPaLLcsN0q0fQzZujrYOILJp4p37ZkacJy4KV3cLPbaG9OwUriR6JySRVJVU X-Received: by 2002:a62:174e:: with SMTP id 75-v6mr17091774pfx.117.1539758143939; Tue, 16 Oct 2018 23:35:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539758143; cv=none; d=google.com; s=arc-20160816; b=XRn9qqSDV04kaQIVl6/O6ZzDeSkTgZtQ1zGs44IZjxlDBqZLCxIVw8+1QfSs48WKRb vauW3Trblv98Co/CXWSISTa7e8MGB2Xc2rZjx2ROWeAGzkZgcnS/JuCcLKrCdLxDkDKv 3OQgnxPapJzBuEET3GACPqQXZHuayE0NGimAoaMUsczF+Z4NaydYxOOKojjgYuVFLEQc n5e8vJvBfO2BuxaohIsEJ9VP5IRzOwD/FYGbR438Tv5xynmXjDmBVMFegfJzb5il7Ba6 TREbYnMLhsrcQTbZV5TvUqaKLb/EdpECNd0+id7J5SyRZfQ2ZpU/Wf7qVYXqdCsLBpU7 NA2g== 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; bh=e1fGaAEHRld7oLwWuf8wocQSXEQGnFQzFkkW47SU2QE=; b=D4yTCpUlKeEQfjeEv+81MKGeS2hfFvZ+a7dkrRESOmHfKh36L/bS41JWK0W+GD/Ov4 XAzXb0v8GCUzkCmJY/iRCnnGj0x0y8J/Ja8kk81pY/GI4skfvTB4NWSSTn/jAOZF1mdO H9xGbFQkwBWga7fvR84TvKPCjpRKxHM5YkSWd4GG5S5ii93tiFsQ23o4KRyBFczanw2F 3iUkuG0kzUl5tMVkBeifZYyxf9AqdE3Cc55q3iixBs5S3NSQ4bnPxjTwVTx/yT3JX0/D 6tCysPl7EBw2QTiKm7In2bxZHqS4uBI6exie3jDv9Gkg/0HY8R5tDi2Xm8DKDQXDV8dj GMBg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f2-v6si18083135pln.270.2018.10.16.23.35.28; Tue, 16 Oct 2018 23:35:43 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727426AbeJQO14 (ORCPT + 99 others); Wed, 17 Oct 2018 10:27:56 -0400 Received: from mga06.intel.com ([134.134.136.31]:61980 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727059AbeJQO1z (ORCPT ); Wed, 17 Oct 2018 10:27:55 -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 orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Oct 2018 23:33:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,391,1534834800"; d="scan'208";a="273090138" Received: from aaronlu.sh.intel.com ([10.239.159.44]) by fmsmga006.fm.intel.com with ESMTP; 16 Oct 2018 23:33:45 -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 , Jesper Dangaard Brouer Subject: [RFC v4 PATCH 5/5] mm/can_skip_merge(): make it more aggressive to attempt cluster alloc/free Date: Wed, 17 Oct 2018 14:33:30 +0800 Message-Id: <20181017063330.15384-6-aaron.lu@intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181017063330.15384-1-aaron.lu@intel.com> References: <20181017063330.15384-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 fb4e8f7976e5..309a3f43e613 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -538,10 +538,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.17.2