From patchwork Fri Dec 14 23:03:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mel Gorman X-Patchwork-Id: 10731789 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 38EE11399 for ; Fri, 14 Dec 2018 23:03:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E06A228767 for ; Fri, 14 Dec 2018 23:03:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D34912878F; Fri, 14 Dec 2018 23:03:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B7FB28767 for ; Fri, 14 Dec 2018 23:03:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 62A528E021F; Fri, 14 Dec 2018 18:03:15 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 506CF8E0220; Fri, 14 Dec 2018 18:03:15 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3CF318E021F; Fri, 14 Dec 2018 18:03:15 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by kanga.kvack.org (Postfix) with ESMTP id C19308E0220 for ; Fri, 14 Dec 2018 18:03:14 -0500 (EST) Received: by mail-ed1-f69.google.com with SMTP id o21so3462957edq.4 for ; Fri, 14 Dec 2018 15:03:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=PBG8hjESQWWVTGMrklYE9aIZO34XECn3ThLlLFNY6h0=; b=KbLzSlB4XLaQua7d3wdXO474sGNX+jNSgkJHILbMKixK5/RayGkBTp+G9/1qc7e2eQ 2HxFOHHIvNv2oBK5qD+51aCHlmdJIwRnFRWsMW1xHxIPy3yqoRprhzNfbvZQW8s2Noi5 TX1r6JP1KSnQz5P75PqVUL2McgaOTno0ff4DYEgU/dOrRYsXp51dR+VZ2GQOExsazNCh 1qVCtCLc5JzwRb+0A+8PWSxi+/NWseYrbtPdz3Ar2GofcytaRQsBVlvv2bQ/q9O3hQV/ 3epNz8K2mRx7mFTJRo/EgcZB/oSv/SkxLQq7lz/258AZp8yjD3fUh3ikCYE+A8S/fZMt /1MA== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.17 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Gm-Message-State: AA+aEWbQeZNYAZXOuvY/Mg9u4GCoDhuUvH4hRUASZAXOx73rwXq07L/u 5blodaHEaItmsm/PfBgsrDuuk1atLYWGjy+Q/A9P6TARuh9xKIFLbrRLjTcOThrLxK0n/jb3xtu 4uZvotratf3YYjVaar8x7TF3VvyhHpSUTxS0LLJ3F/th6OJaF3yt/4J59vwB+Qc/3GQ== X-Received: by 2002:a17:906:c288:: with SMTP id r8-v6mr3638633ejz.9.1544828594281; Fri, 14 Dec 2018 15:03:14 -0800 (PST) X-Google-Smtp-Source: AFSGD/WwOg8/zvIBU7Kr1zDzUK5Z/Y3vyQI+CuzH2T+6dY3ez82Iplilnaj6OzML/Lu6AFfTrXFn X-Received: by 2002:a17:906:c288:: with SMTP id r8-v6mr3638614ejz.9.1544828593345; Fri, 14 Dec 2018 15:03:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544828593; cv=none; d=google.com; s=arc-20160816; b=tm26IrNNSPzR1Kmn/9iGd2coku5widXydelO6TZuqN3Ds9xmLKbHwmJHuYtHAwIG5R O92W2z4g8bSxBbMQqzugSqw796qg/KU9VaBlzhhp3h218qUgdcsEFq5A4SnBwyo1fn1L sxjJGWpdb0B65ffv54UDRlHS2aFk0fYb+krBAZX7z4/cJWpQ8DnmiIsGcTAC6mbzKobG 8un7SLat5mD2sYOUdNLdAC3tb6IxohkTSWMnYmJcGIKz2FACV1wpP9A41AjVvp00XRBB dmr/Tb6mk5DD7DnasAFs5Lr3oc2AaACf9EpHd7UtomLAR446gnox/CHHoh2Hk7V2jajx sdew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=PBG8hjESQWWVTGMrklYE9aIZO34XECn3ThLlLFNY6h0=; b=MOmgZxWo1CO5KcGuhgTKMgl94IuOxxPiLSC9p47oMSaGl+Oj5afrvk7RXWaznTVdTc v2njdI+zcYYqRH/4pE5h5xEOzPUN3/JYND4Tc60TT2ltClbHuTvJk5Pu/70/MMGPj7ji sGH4DTj7rK+v1mzacrbo5lj3GcfQ1PkwnhoyitsqXySh/S2iMDBpprBaNCgUax+Hz67I uL61PDaNlOINvm5nIpSDXIQQ4ZROCZX09c4/vTvr8Qp1AVoZHwwox2hl4Pk5az7N4lI4 5ZLYUJzpgsFHPxipW7AUoRYBVsGp6ufPtrwbzrZzTNM+qYv2g8+NXdUzvvGOfKhAW8FA u/qA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.17 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net Received: from outbound-smtp12.blacknight.com (outbound-smtp12.blacknight.com. [46.22.139.17]) by mx.google.com with ESMTPS id p21-v6si2083183ejx.67.2018.12.14.15.03.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Dec 2018 15:03:13 -0800 (PST) Received-SPF: pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.17 as permitted sender) client-ip=46.22.139.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.17 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp12.blacknight.com (Postfix) with ESMTPS id 0911D1C1D97 for ; Fri, 14 Dec 2018 23:03:13 +0000 (GMT) Received: (qmail 31313 invoked from network); 14 Dec 2018 23:03:12 -0000 Received: from unknown (HELO stampy.163woodhaven.lan) (mgorman@techsingularity.net@[37.228.245.71]) by 81.17.254.9 with ESMTPA; 14 Dec 2018 23:03:12 -0000 From: Mel Gorman To: Linux-MM Cc: David Rientjes , Andrea Arcangeli , Linus Torvalds , Michal Hocko , ying.huang@intel.com, kirill@shutemov.name, Andrew Morton , Linux List Kernel Mailing , Mel Gorman Subject: [PATCH 09/14] mm, compaction: Ignore the fragmentation avoidance boost for isolation and compaction Date: Fri, 14 Dec 2018 23:03:05 +0000 Message-Id: <20181214230310.572-10-mgorman@techsingularity.net> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20181214230310.572-1-mgorman@techsingularity.net> References: <20181214230310.572-1-mgorman@techsingularity.net> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP When pageblocks get fragmented, watermarks are artifically boosted to pages are reclaimed to avoid further fragmentation events. However, compaction is often either fragmentation-neutral or moving movable pages away from unmovable/reclaimable pages. As the actual watermarks are preserved, allow compaction to ignore the boost factor. 1-socket thpscale 4.20.0-rc6 4.20.0-rc6 finishscan-v1r4 noboost-v1r4 Amean fault-both-1 0.00 ( 0.00%) 0.00 * 0.00%* Amean fault-both-3 3849.90 ( 0.00%) 3753.53 ( 2.50%) Amean fault-both-5 5054.13 ( 0.00%) 5396.32 ( -6.77%) Amean fault-both-7 7061.77 ( 0.00%) 7393.46 ( -4.70%) Amean fault-both-12 11560.59 ( 0.00%) 12155.50 ( -5.15%) Amean fault-both-18 16120.15 ( 0.00%) 16445.96 ( -2.02%) Amean fault-both-24 19804.31 ( 0.00%) 20465.03 ( -3.34%) Amean fault-both-30 25018.73 ( 0.00%) 20813.54 * 16.81%* Amean fault-both-32 24380.19 ( 0.00%) 22384.02 ( 8.19%) The impact on the scan rates is a mixed bag because this patch is very sensitive to timing and whether the boost was active or not. However, detailed tracing indicated that failure of migration due to a premature ENOMEM triggered by watermark checks were eliminated. Signed-off-by: Mel Gorman --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 80535cd55a92..c7b80e62bfd9 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -3043,7 +3043,7 @@ int __isolate_free_page(struct page *page, unsigned int order) * watermark, because we already know our high-order page * exists. */ - watermark = min_wmark_pages(zone) + (1UL << order); + watermark = zone->_watermark[WMARK_MIN] + (1UL << order); if (!zone_watermark_ok(zone, 0, watermark, 0, ALLOC_CMA)) return 0;