From patchwork Fri Jan 4 12:49:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mel Gorman X-Patchwork-Id: 10748313 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 D1E1B14E5 for ; Fri, 4 Jan 2019 12:52:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C0282282E8 for ; Fri, 4 Jan 2019 12:52:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B4B45283C9; Fri, 4 Jan 2019 12:52:08 +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 78B68282E8 for ; Fri, 4 Jan 2019 12:52:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 92CB98E00DC; Fri, 4 Jan 2019 07:52:06 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 8B2A68E00AE; Fri, 4 Jan 2019 07:52:06 -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 77C708E00DC; Fri, 4 Jan 2019 07:52:06 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by kanga.kvack.org (Postfix) with ESMTP id 185978E00AE for ; Fri, 4 Jan 2019 07:52:06 -0500 (EST) Received: by mail-ed1-f70.google.com with SMTP id c34so34718737edb.8 for ; Fri, 04 Jan 2019 04:52:06 -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=FnmQpxMABP2Zf611yXswB2S6mBktt6aiC1/AKIq4W7A=; b=dubsv2MoGZYmzgDfUHwpZeUCW8hV52xFzXEq+iopEMAAsfBE+j67VgSTcrnWRrLn1e oZ9L313Jopcc9XaOETs3Rs6RQ6JKZecahEr7cMaA9yXUrhgPlwOlE/m6lLOCNwZ6lje3 4qFC69aO/6PXqwMRPwa/YmdcZFLGx3JIlt9il+ktE4mgd8zph2kCXnvZeYrX+9mY8do6 m0J3RnwsYpehf5pJbBtAB0j8Y0KObkMD6EWBBckmyOtlKSpw5y2fKQ9chmtiBMZGAgSx ohiHkOz4nbUGwcYcZYMsvBm4vlODCRndyyUx6BUlT3vKjvUWrA+u6yHKu+6fLFkLxuo2 dTzA== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.106 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Gm-Message-State: AA+aEWaG9xp8XVmwUMQ+pOo4wDsjesGLNiBdPAwjkuVqJn55a73scnFA 2k+t3HfuVVrG2XRQCPJhg97u462Hs5gcdbU3QrgcLd6ErXSkMdZScDNvrsOe/2GAL8H1Nbq9TOT iMlik6bDtTgo9DTsl39546CE8qcpZHhkIC+vNQAUncTNda1wILDQ1xeH5toHnPVS6EA== X-Received: by 2002:a17:906:e9b:: with SMTP id p27-v6mr38861681ejf.29.1546606325592; Fri, 04 Jan 2019 04:52:05 -0800 (PST) X-Google-Smtp-Source: AFSGD/V0HwrQJrDJyiIFRMxxfMfeyeLyOpY8G2i7EtVAvo6FqX2fODa8E0fNKB/+D8/TXVZqxudl X-Received: by 2002:a17:906:e9b:: with SMTP id p27-v6mr38861627ejf.29.1546606324525; Fri, 04 Jan 2019 04:52:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546606324; cv=none; d=google.com; s=arc-20160816; b=TR6lHgOkGTnbEKTBYIQNK6JKkfRi4/iyUIAtvjI0HHruratqq3/8nt0X9Zroa2bImk MCoRBHiXPwWrab6cSsxxopppSwi+jh86cXMpAKZVUHvb1vK1/JZCUR0AAucVPdULB00l L4GiXuI8ZHaGKdv1hoWdtabAye8/BVUmhBrP8BQKanZPP+nsp9FMDc9bchQhQJy7z5HJ V98mi/1ZO3aGQPBe4wvbJ+P4HpRho99JQOvD9vK6pTakegTqDfxqQTZUTmVgc5648See Eq3KH8vFymg7EgvaPAJrpnRvXILshr/yMM8pw8q1YIVa1omVlX+ZcP7E166rfmSLXohB tvFA== 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=FnmQpxMABP2Zf611yXswB2S6mBktt6aiC1/AKIq4W7A=; b=tFCP4VYHm1/9tR2Mm3gMkYHRIdlFrsb8diCqdrnUoYaf94ZCJJZsYIkunPZBOVNZUk 0owFcEaj8rDIbi4ybqt1NCZ6KB0codyCUwgx+CKAsbPkV/qruahamMK3iwA9dMXymJgv OfIzNAGU9qYcGtF6I1wq1uoQmjObse2iY1NBkhq/B5+xltliHAoj3UYHPE4psPy4ydZy l+9NODZV6rw4AG+NhG+m+H4qNgLnEd+jJY4Uosi5iuHX+jz04Y08DVuzr1k8EaKzgx7b DgTGq39ISX5oIQB5pHnlsIm9T7jghL3aV2Bj/D4TwZ4CRiWV5eOSq/Sl6ZhFrPfV5Gob wMUQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.106 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net Received: from outbound-smtp11.blacknight.com (outbound-smtp11.blacknight.com. [46.22.139.106]) by mx.google.com with ESMTPS id a30-v6si360894ejl.130.2019.01.04.04.52.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Jan 2019 04:52:04 -0800 (PST) Received-SPF: pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.106 as permitted sender) client-ip=46.22.139.106; Authentication-Results: mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.106 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp11.blacknight.com (Postfix) with ESMTPS id 33A8A1C1B9A for ; Fri, 4 Jan 2019 12:52:04 +0000 (GMT) Received: (qmail 2494 invoked from network); 4 Jan 2019 12:52:04 -0000 Received: from unknown (HELO stampy.163woodhaven.lan) (mgorman@techsingularity.net@[37.228.229.96]) by 81.17.254.9 with ESMTPA; 4 Jan 2019 12:52:04 -0000 From: Mel Gorman To: Linux-MM Cc: David Rientjes , Andrea Arcangeli , Vlastimil Babka , ying.huang@intel.com, kirill@shutemov.name, Andrew Morton , Linux List Kernel Mailing , Mel Gorman Subject: [PATCH 10/25] mm, compaction: Ignore the fragmentation avoidance boost for isolation and compaction Date: Fri, 4 Jan 2019 12:49:56 +0000 Message-Id: <20190104125011.16071-11-mgorman@techsingularity.net> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190104125011.16071-1-mgorman@techsingularity.net> References: <20190104125011.16071-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 57ba9d1da519..05c9a81d54ed 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2958,7 +2958,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;