From patchwork Sun Mar 27 02:41:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 12792701 Return-Path: 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 BDD16C433F5 for ; Sun, 27 Mar 2022 02:41:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C4D7A8D0002; Sat, 26 Mar 2022 22:41:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BFBB58D0001; Sat, 26 Mar 2022 22:41:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ACBFC8D0002; Sat, 26 Mar 2022 22:41:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id 9C27D8D0001 for ; Sat, 26 Mar 2022 22:41:30 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 64BB85DF for ; Sun, 27 Mar 2022 02:41:30 +0000 (UTC) X-FDA: 79288615140.11.6FF235C Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) by imf02.hostedemail.com (Postfix) with ESMTP id E2C948002E for ; Sun, 27 Mar 2022 02:41:29 +0000 (UTC) Received: by mail-ej1-f52.google.com with SMTP id pv16so22346535ejb.0 for ; Sat, 26 Mar 2022 19:41:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id; bh=Lp7OyzRBJpk9Yhtc35RHQ3SBsAFn1AOoGl5hsCUQLbs=; b=MAfmrOrSIP7drRaxTKwnegVd2sfztTnVTorPJK7e8aedVf6yMq/vRH817+4junb0ix ww+vG67sokwSMY5RVO6HhUib64/0sQ2XS5JucHsX31m/OR9NLqUTm9p+n6V11nImiTX3 Z6HtXyyaaSK/XZDBfV6wnTdmzYzovYALAQZGw3clsmYjWZX168IuxaKjggXyvjp9G2Px cM/1T2ZQiLgW6HDPX95O0zS7ODao/evQK+pSDRxmDrqpOpGkIKEc17SMD8p9XLvUpB88 eM8cWlmXHL4+vvCZrLiMp64LTm4si3S0fe3GkN83AQ0V8uFCGK0eAWNcgrM0fMB3WjWU yu2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Lp7OyzRBJpk9Yhtc35RHQ3SBsAFn1AOoGl5hsCUQLbs=; b=BpQTWHn6cwvxvsNSKTQoA+rN1HTi6dBp3qOEujRkEj2Fo+yt0Gt7cPhRjjbyunJuLj aFaVt/4IUHJBOxfmdROKzNe1mqxgkcmXkMfBv5ejbg+HVzcmnI/qCgwX8i9U/ZcS+4Kt iVpMETP4nS9HQvn6g7DS46wiQjvcVb9GfVDwfVGbD4zBSZ5N4I3s00ihxdHTcivhIbsJ GFBBSBV7pRRgB/jufI/oK4h45RP6MJ0/6eV6gLJZ4oO1JN6nvTs15P+b/3zUPbDYeN9M R6B9pVkoBGJcAQuJMcyvZP4SMJ1ibjsqh8phMRh7NLEdl98uodRaN/Azaf16OmDTHvub 7elw== X-Gm-Message-State: AOAM532TkSXJ3Ysm1G4NHfLO6NZwUA5o29pLU9Yz4nAOh2HTyjReEgYN KAejoeg02XP6QP+v91UanA0= X-Google-Smtp-Source: ABdhPJwff1yCMKXeTrXkMama+S8HcSKS9lgO5aoriPadtVF0OJUe0QGsnM0vV+XByfwOXQGdiWM8OA== X-Received: by 2002:a17:907:eab:b0:6da:8ec5:d386 with SMTP id ho43-20020a1709070eab00b006da8ec5d386mr19851733ejc.668.1648348888564; Sat, 26 Mar 2022 19:41:28 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id sd7-20020a1709076e0700b006e015549bdfsm3982750ejc.53.2022.03.26.19.41.28 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 26 Mar 2022 19:41:28 -0700 (PDT) From: Wei Yang To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, ying.huang@intel.com, mgorman@techsingularity.net, Wei Yang Subject: [PATCH 1/2] mm/vmscan: reclaim only affects managed_zones Date: Sun, 27 Mar 2022 02:41:00 +0000 Message-Id: <20220327024101.10378-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 X-Stat-Signature: fqrwtpk1xfce7syred33sawdumhjatc7 Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=MAfmrOrS; spf=pass (imf02.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.52 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspam-User: X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: E2C948002E X-HE-Tag: 1648348889-732325 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: As mentioned in commit 6aa303defb74 ("mm, vmscan: only allocate and reclaim from zones with pages managed by the buddy allocator") , reclaim only affects managed_zones. Let's adjust the code and comment accordingly. Signed-off-by: Wei Yang Reviewed-by: Miaohe Lin Reviewed-by: David Hildenbrand Reviewed-by: Oscar Salvador --- mm/vmscan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 7ad54b770bb1..89745cf34386 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1031,7 +1031,7 @@ static bool skip_throttle_noprogress(pg_data_t *pgdat) for (i = 0; i < MAX_NR_ZONES; i++) { struct zone *zone = pgdat->node_zones + i; - if (!populated_zone(zone)) + if (!managed_zone(zone)) continue; reclaimable += zone_reclaimable_pages(zone); @@ -3912,7 +3912,7 @@ static bool pgdat_balanced(pg_data_t *pgdat, int order, int highest_zoneidx) } /* - * If a node has no populated zone within highest_zoneidx, it does not + * If a node has no managed zone within highest_zoneidx, it does not * need balancing by definition. This can happen if a zone-restricted * allocation tries to wake a remote kswapd. */