Message ID | 20230418191313.268131-20-hannes@cmpxchg.org (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1E95C6FD18 for <linux-mm@archiver.kernel.org>; Tue, 18 Apr 2023 19:13:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8C443900009; Tue, 18 Apr 2023 15:13:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8725F280001; Tue, 18 Apr 2023 15:13:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6754E90000C; Tue, 18 Apr 2023 15:13:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 4E0A7900009 for <linux-mm@kvack.org>; Tue, 18 Apr 2023 15:13:44 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 2D7A2120362 for <linux-mm@kvack.org>; Tue, 18 Apr 2023 19:13:44 +0000 (UTC) X-FDA: 80695461168.12.8602701 Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) by imf23.hostedemail.com (Postfix) with ESMTP id 6974614000D for <linux-mm@kvack.org>; Tue, 18 Apr 2023 19:13:42 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=cmpxchg-org.20221208.gappssmtp.com header.s=20221208 header.b=mwxAjt5F; spf=pass (imf23.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.160.170 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org; dmarc=pass (policy=none) header.from=cmpxchg.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1681845222; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=bns8+mp3X6nXdCFxV2tvIrIcPUTCwJdDXntfPdL7pp0=; b=BZN0NGxa5tzS6UdoszkDBnjCzU9bepQeLQWa/0cp81fkHN3K4WtCComwMTavOhB3xJcQLV /XquBy6ZUgp84rp59L6GPOxJ1Ij9wdd6RJ9iNRRp9sKxxSRgqKbCfAAu6oq1elTKx7/Q+z Dm6iuXEWDX51rg19FHyDAnMWdDPUhco= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=cmpxchg-org.20221208.gappssmtp.com header.s=20221208 header.b=mwxAjt5F; spf=pass (imf23.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.160.170 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org; dmarc=pass (policy=none) header.from=cmpxchg.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1681845222; a=rsa-sha256; cv=none; b=DgCpXspTXfPsxJtvw5DtHdTNUCjX1s+UysImPCgjN7la5K/Vh+4YpDa8DtdWe51Iruq51E xAfjG6OLQHkaSzR73k6yIxRMTAHdgxdQh1KjrFcNQ3M0LXvgsWJcHIeCCyNawwpSpmUB4z Pk+1SFwyL60FhcgjCYUaa8EFjAs+jpk= Received: by mail-qt1-f170.google.com with SMTP id a23so25544622qtj.8 for <linux-mm@kvack.org>; Tue, 18 Apr 2023 12:13:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20221208.gappssmtp.com; s=20221208; t=1681845221; x=1684437221; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bns8+mp3X6nXdCFxV2tvIrIcPUTCwJdDXntfPdL7pp0=; b=mwxAjt5FHbXosh8eO+VsA0QaIzkPHSj509IMResMBLrFCDtFqQuAb39AWA+k+QpfGQ 2sTi7ak9g0/7anwaLuFZa8TnEH9/W0IsasBzTf35DDXZIjNZ/+iQTItjl6xvXY6x+qbV svWyu0WEhJTQsOP5r4KsHn0kvCVHMCqKPohNvbGE7v7GTuISWCmFDVvEjh+wYDMd6gPV QPpD51iUk1E7ChSCX2CJ4//Jg45qmYKpV2D2NrCvvOkGI9qVSedCxygcX/hpgxgpYiRw KQnkSn73bb0v0CpIU4XcXH/w9PR1l/pMtfWeS5WYklu48+aB4n8+2PHRP8wlzmglM4v3 6yMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681845221; x=1684437221; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bns8+mp3X6nXdCFxV2tvIrIcPUTCwJdDXntfPdL7pp0=; b=jpkwVuPN9NdgULoAXnhU9Mvw744U3QzC+jTS6OZCcgWMd+ac0OPudCxRujv8e4AGnd CiCq0nwjDoaL58z0ukT+9PgzBL020jufoQTZaCpltDkTYDzE9ZebLPIznY5csOPknOWq Jia5utiq5ekgE1bzDd9w2v98qv/n0D+fzfn59WJ9VzU8QWngNCh2dUw35cJSZxfhL9CB Px/j+zyGHyQzZAef8X7sIbTrSJsVg79mHhpeAtEyBr58tK6uYXFtwWYMDnVxRqI6ASam eXCk5bltN7S0FP8OBEM5mwPEXs2XSiru47gzFCmLqKvCf+UJyTndLRYIbtGE4ym72txQ x1sQ== X-Gm-Message-State: AAQBX9cj9vKYKpKVl2tVgX3aK5DZ71HaFC/ZdG9yaDVvWhS/QE/7c1Lh FEQSIkOlyNQA78SLKv1kgTht0WmnqEfKwUO04KU= X-Google-Smtp-Source: AKy350YxL97fUsu7ft+nTwgxWroY8EhxqBqMYvhNTWaLrHbHqzHqIxvgWZLrQ3ewFfKTOzgKcfLxmQ== X-Received: by 2002:a05:622a:20a:b0:3e4:e94a:5082 with SMTP id b10-20020a05622a020a00b003e4e94a5082mr1611125qtx.5.1681845221305; Tue, 18 Apr 2023 12:13:41 -0700 (PDT) Received: from localhost ([2620:10d:c091:400::5:e646]) by smtp.gmail.com with ESMTPSA id r15-20020a05622a034f00b003e4d43038e2sm1829712qtw.5.2023.04.18.12.13.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Apr 2023 12:13:41 -0700 (PDT) From: Johannes Weiner <hannes@cmpxchg.org> To: linux-mm@kvack.org Cc: Kaiyang Zhao <kaiyang2@cs.cmu.edu>, Mel Gorman <mgorman@techsingularity.net>, Vlastimil Babka <vbabka@suse.cz>, David Rientjes <rientjes@google.com>, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: [RFC PATCH 19/26] mm: compaction: drop redundant watermark check in compaction_zonelist_suitable() Date: Tue, 18 Apr 2023 15:13:06 -0400 Message-Id: <20230418191313.268131-20-hannes@cmpxchg.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230418191313.268131-1-hannes@cmpxchg.org> References: <20230418191313.268131-1-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 6974614000D X-Rspam-User: X-Stat-Signature: wfdmqh9fg1qbknsymrtx6mk8crb46d43 X-HE-Tag: 1681845222-436338 X-HE-Meta: U2FsdGVkX19P+pWzIEzLxXTizO9x66JEM2I8g+fi+ucFsmYHewEtY+Q5GkDnR+qnGVEzpJ8ZSkLuHNn2SfyXZX8+ZB2uF811AmCQRj1YLJtk44Y58BrTu2veva+BU/qiDoMoZK7+PDezaHdCe9ZlHJbvNqfyrolwzzS5FQF6fmkAPv7g9ziZujnK2pOWrGaZ9jJxPXkvyGY2ondhfQzYAP48J6wXbEEGSnU37opemd8z8pk//7hChrN96k2T3/WUJiCSV13+k+As0B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BncplpI22ZuiIig94sDkQBD8avm8ZIoMnjSGaloBkYwnb/AAPKiRAVSuxBnPrZNdBkITxCkgAfU1uJWXNxn/5fkPejl0AwIS0WWdljRtg4ZcqC+2xBhrzVJfcb7b/QRzoFVZt6SlvBZuaRdUg== 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: <linux-mm.kvack.org> |
Series |
mm: reliable huge page allocator
|
expand
|
diff --git a/mm/compaction.c b/mm/compaction.c index 0aa2a0a192dc..52103545d58c 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -2263,13 +2263,6 @@ bool compaction_zonelist_suitable(struct alloc_context *ac, int order, for_each_zone_zonelist_nodemask(zone, z, ac->zonelist, ac->highest_zoneidx, ac->nodemask) { unsigned long available; - unsigned long watermark; - - /* Allocation can already succeed, nothing to do */ - watermark = wmark_pages(zone, alloc_flags & ALLOC_WMARK_MASK); - if (zone_watermark_ok(zone, order, watermark, - ac->highest_zoneidx, alloc_flags)) - continue; available = zone_page_state_snapshot(zone, NR_FREE_MOVABLE); available += zone_page_state_snapshot(zone, NR_FREE_CMA_PAGES);
should_compact_retry() is called after direct reclaim and compaction have failed to produce a page, to check if there is still enough compactable memory to warrant continuing. If there aren't, one last attempt at the freelists happens in __alloc_pages_may_oom(). The watermark check in should_compact_retry() is not necessary. Kill it. Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> --- mm/compaction.c | 7 ------- 1 file changed, 7 deletions(-)