Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp5819595pxb; Mon, 28 Mar 2022 18:19:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywfWjtagj+Wv436s8S/TtN8LDqlqQgp7YZ8RUJiHjVpwK/03iEcPAWBD7G64+Z7Sb4HnuL X-Received: by 2002:a05:6122:91d:b0:33f:bda2:7dcc with SMTP id j29-20020a056122091d00b0033fbda27dccmr14920378vka.36.1648516745963; Mon, 28 Mar 2022 18:19:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648516745; cv=none; d=google.com; s=arc-20160816; b=C9vMfa0fdfKHdmUISet/i2apt0UYwGfhuzS+3kGk+2KNFKiJWRYIfzltoXsoHJZQf2 XBIQDwC7PRm1gHbAJmrUJTtrCd+Y3giFlZ5sX3d+I3Ww0RKGmJHhq3CStFpN+cgM/Umu 2F6F+e+foP1w1dUDC9j9Ngofj1Z4XJrmIC0t3GEREiEWw/kwxqT3sAHrtIy5/dDvLzWo 6/1nE0ifu2u7lQ2+/N0iWYuhD59RuGWSne/8S44QQqUYgRnFJBdBrXJ7tEMZnLNNSU9Z D9jZRndfV+gk3BZ6Mv+bC3Pj1KUqSjGD8k2YsDe67BXRQbvy1Yg2oHnWVDJDJJ0WB4D5 qkQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=weU7q/SN2SltRbJQURNE4PC1QrQjfwh5B+KAtHbIdnc=; b=v5Q8X7ZrZq04rUcBWbx6BHGbvX0YylkxJk4EZ7xNpGBTq/LdUTEHQcnma6msrXmbGc yDSxJwknu2PZx8i/Mr1HcjQnD5DKBFD1wt81G3jDCl0jBsNzywjkc6jrKZrEk2A1h2v6 gZZClUlF9kvMi1AoUmtAfTCYz7+oBu0jD6VPoU8MGzFkear6WBiqMBqqRg93FNvY9wd4 UOXxMZDF/kMZKsVDdzzAVTBeexALe3qzPmfZmKeizroeyYE3/ESIjkIQa/86t4Xz0aZz z5vWYomnphlY2Ad4rBpSAeT6rL+cCOTJdrPOX5dBZgDATElidZXoNt7K1Q3UbEhXsGVy CIpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=k6iWONx0; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u23-20020ab05557000000b0035982a12ddasi4105123uaa.120.2022.03.28.18.19.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 18:19:05 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=k6iWONx0; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C662C28981; Mon, 28 Mar 2022 18:09:32 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229531AbiC2BLE (ORCPT + 99 others); Mon, 28 Mar 2022 21:11:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbiC2BLB (ORCPT ); Mon, 28 Mar 2022 21:11:01 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 198F927B2D for ; Mon, 28 Mar 2022 18:09:20 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id b24so18919213edu.10 for ; Mon, 28 Mar 2022 18:09:20 -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=weU7q/SN2SltRbJQURNE4PC1QrQjfwh5B+KAtHbIdnc=; b=k6iWONx0uz3YChLyoZl9HRU7H3syEfFSjM5BSJbE/VqJ8rKfOp0dFo3X4DJd8CKDHx 5zPYcIebYhftht2alU1mQV+pmSpyhwZHWJN6iYHHAjmKCkXMXpLOiQQXBiU/m0hHXWEm i5YKf5Qk/JcfcIqxh4VmRvf9SN+icp7poTb0JQjwgCNKk68HCC/m2eDvz0FgJ8G2L1PC 6FQxg9W/Buf5DTlOGN8pWas/ThshtLegH8vW8sI/r3ba5BDLUFlNQHpEFSYtJVBoJtFx NjClO7UZuNCB6D8/hyLpc3c3qqsBHCftaDG4A5ynGzhXTCV3BVOGfvYGYaMNjuGIIBg9 mq9Q== 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=weU7q/SN2SltRbJQURNE4PC1QrQjfwh5B+KAtHbIdnc=; b=mvxLnBUQyNJ4nFjzCuVyLchJS1/m7QaoQQfQyhGsTRYvrEX+RpM5wCPJ7LEz1Ie3Gi olQGPsdWYMJgDIBBcZhsxuXoXQKun8OkB4++vk3rFRq6BOeHcaWvEu2l4vlsqbWdCvfL yjJf/dFEtDXh0JXm68vlt+W50EuBPDK77y9Nt0A5R/rv3Ak3KY7SXxx+9Mv4gncZXAIT yCvjMLt40fb5+nLNeIXeDiLIWPLUIl5OnEciYR4/o0WR7pLiMC/ab8PXlwBN/YoyKdUN XCmV4rlD+kZXdiCGhONyd6vST7WAvVhK2fQrpyJZFz53RQ0We3UWTFopHHqGwB0vkmr5 qiRg== X-Gm-Message-State: AOAM531aQaAry8v1E0VZ0Tde0dMM/rFcwa2nWXTEjYLFbSwMfbjbIjcZ JuXi4GXkzdRLa9rcxyOI1ds= X-Received: by 2002:aa7:dbd6:0:b0:408:4a31:97a5 with SMTP id v22-20020aa7dbd6000000b004084a3197a5mr991335edt.186.1648516158666; Mon, 28 Mar 2022 18:09:18 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id u10-20020a50d94a000000b004131aa2525esm7896399edj.49.2022.03.28.18.09.18 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Mar 2022 18:09:18 -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 v2 1/2] mm/vmscan: reclaim only affects managed_zones Date: Tue, 29 Mar 2022 01:09:00 +0000 Message-Id: <20220329010901.1654-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: "Huang, Ying" Cc: Mel Gorman Signed-off-by: Andrew Morton --- mm/vmscan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 1f2d79e8c43c..4385b59ef599 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1040,7 +1040,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); @@ -3909,7 +3909,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. */ -- 2.33.1