Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp726995rwd; Thu, 15 Jun 2023 00:53:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4KR2xxIJGNxAl1q/J3BNbKT+LlW4EvDgr6ZxzJQ5lMDRqhDwVtVYJrelHzP6y7U5O0W5GX X-Received: by 2002:a17:907:948f:b0:982:4b35:c0b6 with SMTP id dm15-20020a170907948f00b009824b35c0b6mr3478999ejc.1.1686815590447; Thu, 15 Jun 2023 00:53:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686815590; cv=none; d=google.com; s=arc-20160816; b=Z5EnB0cqra+zq0H/BWYfVg32a8h0XSdUcgWuS++C0nWqRXH+s9IxTBaCjdtysHBTTw bcKOKV+AXDzBQYBTuXNUPJBnSntYjmIlqFWMUYp3UgadzHMPUibco93TOU9FVkkJbfzE 0lB/0P2hMZhGBpkrWEkJfXK3hiKyxY2MkMUM8jRA/3Nb/MPns6hPQRCfHHGNxyoTCsOc sf/EvJ/YP1iL3w6VZ17SP17cLbKgS7WqIHypvpqnksk0GTVwzjPhyUnKrMUoIniYMxXt dyi6Cby1bp9IR5ezpIl23zVLqZvkgHcObU3Nz/sWMXH0UYtnlcU5spHEKitrRoFnyoj+ AKrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=CdSuqedJEIbRKqsNMW9S5G/OsjR68rCgzUTpBoDLnEM=; b=Y+qKeYPnUrFiEkIkYabQvc2yZ0pkxVCVmkXDS2HDCUqmBu+Am7Ph70P8/Bghb4zjDN vP2UP2HPwjEfNtIik+tO1ZN6L6NLRctX50+4bRF444hh2ZIa2Q9Z9lscxU9/OVzqhw+R tvlxN2O8/d6qr9f1CwKuHjqaPj32ZnRZwO13/MieJPj3BMwYZpiwUdE7fXCc58YIAIzt 6Jg7AmNddnXZq2KET1+forG/fLWp2om4V/OZiop3G8fUvlty6ZPDji0An8Bb6ingJra6 ntVRG2KASv0/7VFaVMzp1ziAdLwbjpeTINQXMcQP9hBtQskvjsDatx8vQM3/GHb2ikk2 7zcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shopee.com header.s=shopee.com header.b=iU852+gD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=shopee.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bj2-20020a170906b04200b00982711a2f13si1641715ejb.544.2023.06.15.00.52.45; Thu, 15 Jun 2023 00:53:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@shopee.com header.s=shopee.com header.b=iU852+gD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=shopee.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243486AbjFOHdT (ORCPT + 99 others); Thu, 15 Jun 2023 03:33:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245003AbjFOHcx (ORCPT ); Thu, 15 Jun 2023 03:32:53 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDFE62D4D for ; Thu, 15 Jun 2023 00:32:38 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-666785456adso966176b3a.3 for ; Thu, 15 Jun 2023 00:32:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shopee.com; s=shopee.com; t=1686814358; x=1689406358; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CdSuqedJEIbRKqsNMW9S5G/OsjR68rCgzUTpBoDLnEM=; b=iU852+gDGJfi782GaPH9x2wg+XeTiQfHnMpKe82njSX7LmSgor6PAYAv0eEFGaz83T V469KupOqNbHHXNJ4Jefz2GB3bC4LZjS2faO6A6T5HWzH2FFEcITh2Zsgk5/t3sKWY44 NkzEhL0j/+VTAue8L4PvlYkIgx+veA8rgIpczK6FpJUpuYTWFAXj5VvB6se0797A+t3J mgGiwwWbHp4YJ3r4k0RWOusTLSUkzwa+q0OoRPly9mGKor87OeO/SXxdU8wAQ+Wd053g AJyBa0S3RjgNzLNNkJdtpb63/NRDm0Z0H1NOH05Zft4GUThQFhik4A5One3CXwpQ3lUh nI7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686814358; x=1689406358; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CdSuqedJEIbRKqsNMW9S5G/OsjR68rCgzUTpBoDLnEM=; b=btavRuI+MKAxS7h8q4JqYnohJI3aOtc4/+0F0gxUBMCSatwKtrmOv/oA7ZmKiEXCM/ a9Ved9B6TLTVBA2HRvadunPSAkiWpLYOAIvYpSibnQzShYYYb8IJjFFHRUMNoJXXo0/I kcEjguYH6kryy5BYx8kAeznZqxTzUjKT2k93SCLEw1pjYc8dSyOppJZ19w2cMOdAbCZf JyrsTyDnzj3rueT68K8Yeve/3CZ3E7FaI4n2TXVVAP4z+h7dXRTFoHYG04Qwd4c2DnHJ g1JHbDXFV8DAspCLbJ7N344/twHonbr2u1L736ykI1M1KueLc43+LUKmQ3uXJKgUnfg/ NzLA== X-Gm-Message-State: AC+VfDyOurpp5Fm0gzOzTPHDPF5qHQPqJFwi1iYBMtya0tGyn2HBPk5J 3V4j8O75uar2HeOuqdg4FJ/P4g== X-Received: by 2002:a05:6a20:42a6:b0:10f:f8e2:183c with SMTP id o38-20020a056a2042a600b0010ff8e2183cmr4686446pzj.51.1686814358308; Thu, 15 Jun 2023 00:32:38 -0700 (PDT) Received: from ubuntu-hf2.default.svc.cluster.local ([101.127.248.173]) by smtp.gmail.com with ESMTPSA id z18-20020a170903019200b001acad86ebc5sm13352570plg.33.2023.06.15.00.32.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jun 2023 00:32:37 -0700 (PDT) From: Haifeng Xu To: mhocko@suse.com Cc: roman.gushchin@linux.dev, hannes@cmpxchg.org, shakeelb@google.com, akpm@linux-foundation.org, cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Haifeng Xu Subject: [PATCH 1/2] mm/memcontrol: do not tweak node in mem_cgroup_init() Date: Thu, 15 Jun 2023 07:32:25 +0000 Message-Id: <20230615073226.1343-1-haifeng.xu@shopee.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 mem_cgroup_init() request for allocations from each possible node, and it's used to be a problem because NODE_DATA is not allocated for offline node. Things have already changed since commit 09f49dca570a9 ("mm: handle uninitialized numa nodes gracefully"), so it's unnecessary to check for !node_online nodes here. Signed-off-by: Haifeng Xu --- mm/memcontrol.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 4b27e245a055..c73c5fb33f65 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -7421,8 +7421,7 @@ static int __init mem_cgroup_init(void) for_each_node(node) { struct mem_cgroup_tree_per_node *rtpn; - rtpn = kzalloc_node(sizeof(*rtpn), GFP_KERNEL, - node_online(node) ? node : NUMA_NO_NODE); + rtpn = kzalloc_node(sizeof(*rtpn), GFP_KERNEL, node); rtpn->rb_root = RB_ROOT; rtpn->rb_rightmost = NULL; -- 2.25.1