From patchwork Fri Jan 18 17:51:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mel Gorman X-Patchwork-Id: 10771367 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 221206C5 for ; Fri, 18 Jan 2019 17:53:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 119B12FC07 for ; Fri, 18 Jan 2019 17:53:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0606E2FEF7; Fri, 18 Jan 2019 17:53:13 +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 D54662FC07 for ; Fri, 18 Jan 2019 17:53:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E8A2E8E0016; Fri, 18 Jan 2019 12:53:10 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id E3A808E0002; Fri, 18 Jan 2019 12:53:10 -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 D4F3F8E0016; Fri, 18 Jan 2019 12:53:10 -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 7DC468E0002 for ; Fri, 18 Jan 2019 12:53:10 -0500 (EST) Received: by mail-ed1-f69.google.com with SMTP id v4so5124829edm.18 for ; Fri, 18 Jan 2019 09:53:10 -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=XY602cqHy6JklbpqaWogx0es27AK1EZmJD68GbOsrjc=; b=cC3u8ML+id9i6LUjth1jRCIxCRGfDgpiBeMBzRrmV0bumMDEpGK6t9uHoonp3vE/rW Vgk+RJn2RVfVjRexCjtWJd8VvfAwbkQa9hGpHGyKKadjFIBmmWt5Mlw928Mx7K4vlDpS rpopZpcNW47tv72BQr4HXaxzOlmFX2ZFB4g0LkSKJADDuMmsjXH4vHw0aHSlWDnQVOJJ Vq6Ww5DjJUVaXPkVTD6rbugeLAX2jnGZOspgIKtMpD6FFJtUkqLu/PWq92NdY2YKwlJc i4zAzciWS9BO25mROSlWm3quuZwqLSUXc5HyqZzjHW6Z9ED/axCwqjvWsg7AU4Aq5WLa maSw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.233 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Gm-Message-State: AJcUukccbmFs97OqHS5QrNBzyYVE2Yee9j4mvLOusyQGovNK/RA2YCa0 LdvFin6auJeflaSOwTJEUfFxapHdKvXeABOVshOH8EWxWet0jBYO8GsP7O9BGGdAzeSkY8Ug+H/ K7LThV1QYEBsFoRyvtsZN4fyFni/Qvr77ya5PoXjRoElyJ90weLN7E7CP/X04+x429Q== X-Received: by 2002:a50:b103:: with SMTP id k3mr16145672edd.247.1547833989999; Fri, 18 Jan 2019 09:53:09 -0800 (PST) X-Google-Smtp-Source: ALg8bN47zsbkS8VwshLUMoO1Qp/4ql+orBEJ14D6VOl708vBlccvtxMlAJC2lXniUPomInZsulLg X-Received: by 2002:a50:b103:: with SMTP id k3mr16145603edd.247.1547833988839; Fri, 18 Jan 2019 09:53:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547833988; cv=none; d=google.com; s=arc-20160816; b=x//nFE2NAKfMo6C6YpUk+w8H/7i5y6E8CPHJiriZGEnTZLst/JfnbTwrc327TJk0j4 +pTYMtIC2eJ9490tPzMEiz1vxz1iijOYbVB0MSVjEsK5Zw3zFMEr1rTk51FiTvzTGqeV DLqzfE9AOuJQQCBn5OlH8QJ2/0qPjz9KUYmqYxguayNx4/2UCzk4cT+mSf0YCvAWS7Ze PbYUccaJOhLGSLPFgBJn4j8m4mdgKr+lC7RyN7uXoEyaZYbMzZQRPPtrXJPCO8VW51W4 dqCjeRKv46Da9HvMMsg3esv7mFjorbowqHK8TtDg5MmtPftw6kvkIz/GWUXOi9ENitnO fHqA== 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=XY602cqHy6JklbpqaWogx0es27AK1EZmJD68GbOsrjc=; b=AyMCikrUEeqjSK3HSRuDpXg0gMTohsvPWPDDcdITm3GWrhHJpi8RbkXBDF/gEaKQPs ZzDe3ogI1EsSpdywDnZeHrv8RMLHJ8QXQTWPOsH9ovIUvztBgbU1gtiE38GEVqcMn5hC MSjmFVbiINlOciVBMGQKjOS5Ox8+yfF0l+K/4q0Gp6s2bnZlmTLk6Eujp8j14EIRXNaC Iposlp1ufOHDIM+N6JIeYbPk5uczYhTgngQ4Z1ynwrQajtNnAZtko46B0sAsApDxagSh F6Ym5UmgXwo3DHmN07ANyiuAy2Rhxv7obP1m+WvxwImuJTTt/Au/neDIrE68BU3Q+MSI Ji2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.233 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net Received: from outbound-smtp16.blacknight.com (outbound-smtp16.blacknight.com. [46.22.139.233]) by mx.google.com with ESMTPS id b11si2180785edj.393.2019.01.18.09.53.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 09:53:08 -0800 (PST) Received-SPF: pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.233 as permitted sender) client-ip=46.22.139.233; Authentication-Results: mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.233 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp16.blacknight.com (Postfix) with ESMTPS id 803011C35AE for ; Fri, 18 Jan 2019 17:53:08 +0000 (GMT) Received: (qmail 2023 invoked from network); 18 Jan 2019 17:53:08 -0000 Received: from unknown (HELO stampy.163woodhaven.lan) (mgorman@techsingularity.net@[37.228.229.96]) by 81.17.254.9 with ESMTPA; 18 Jan 2019 17:53:08 -0000 From: Mel Gorman To: Andrew Morton Cc: David Rientjes , Andrea Arcangeli , Vlastimil Babka , Linux List Kernel Mailing , Linux-MM , Mel Gorman Subject: [PATCH 08/22] mm, compaction: Ignore the fragmentation avoidance boost for isolation and compaction Date: Fri, 18 Jan 2019 17:51:22 +0000 Message-Id: <20190118175136.31341-9-mgorman@techsingularity.net> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190118175136.31341-1-mgorman@techsingularity.net> References: <20190118175136.31341-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 reclaim pages to avoid further fragmentation events. However, compaction is often either fragmentation-neutral or moving movable pages away from unmovable/reclaimable pages. As the true watermarks are preserved, allow compaction to ignore the boost factor. The expected impact is very slight as the main benefit is that compaction is slightly more likely to succeed when the system has been fragmented very recently. On both 1-socket and 2-socket machines for THP-intensive allocation during fragmentation the success rate was increased by less than 1% which is marginal. However, detailed tracing indicated that failure of migration due to a premature ENOMEM triggered by watermark checks were eliminated. Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka --- 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 fc769ff4fb2c..6607cb7131b0 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -3071,7 +3071,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;