Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4473107imw; Tue, 19 Jul 2022 07:16:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u9Rrm43QWeEZ+cSUpNHdB3URuMX8oVDEmi2XTopb3yuUIb4EWHJa62EzLXbRzXpTNkg00X X-Received: by 2002:a17:907:728d:b0:72f:38d0:b8ae with SMTP id dt13-20020a170907728d00b0072f38d0b8aemr8883844ejc.30.1658240178044; Tue, 19 Jul 2022 07:16:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658240178; cv=none; d=google.com; s=arc-20160816; b=sKgXmpLZKiE4CdbuPrs77qIiMS1xhka4xqulHKZlxqh2/a2Ilaeag31T06YgqyHa0P EWHmDX2y3QCSV3Q7H0QfeCuLuHqJiJ7cDGc8oKbv/17e1JDdctHI50SZkXsC5x2m/qIY z/SI1EMnp5OeV/eoT5genFFlQDpUGQ2l3X+rfGG/3aaNr615EQqOQDrGOapH3IGlP7I0 9BJfjGplFOjGw3U4kePq46evYkJHQichNCmg+tPJOXYldi/7K9CfrIHI9u7XX1jM3N6n 0v5Hzz5QbWOnBw9FI82jOOqYzNjNR6goc8gQLEGTP/qM9XCSwg3DJyZ3E1Rg/oGT4IVg TZbg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JcDxXFl9DYqmqAF4CYtauVDzztq6aor8ODc8ZBox40A=; b=gufJsoyoIFBuU/OcICd1RkFQF346G1LWE5xPrfklJ9JVZUv2qKiMtfjIitOYYt79c8 JzKHFOSfhZOVpj1CFJHmj+sBs+i0zWy1B5IvOISM2m1XlcOe5e2z0i057ErdgB6rnSIn MRSTdFIAlr8KC54zBzcqoow5G1TriR9IaZNCg8/ReEJTu7WJolwAKV0U9MRNXMJEmCK9 yJSozg4P4gfBILQpzYf4JXhYFSq4C62LY8wvDxFSMqCqD5hUAiMMZD3WQveeJGMfDUmJ aXZjv7Y/4oJ/ym8GZMuEdKiZjSjLBbqxV51/We9WyCNAtn+lJ7rJ8WE6cOgcVgbVQiiW eElg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=z2yRs+lo; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd17-20020a1709069b9100b00722e5217355si24989056ejc.607.2022.07.19.07.15.53; Tue, 19 Jul 2022 07:16:18 -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=@linuxfoundation.org header.s=korg header.b=z2yRs+lo; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242684AbiGSNC2 (ORCPT + 99 others); Tue, 19 Jul 2022 09:02:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242806AbiGSM7i (ORCPT ); Tue, 19 Jul 2022 08:59:38 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CBB363CD; Tue, 19 Jul 2022 05:25:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C60F0B81B21; Tue, 19 Jul 2022 12:25:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B822C341D8; Tue, 19 Jul 2022 12:25:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658233506; bh=8eWx/eELbvZZCIShRKaxQ1ohRxKtl/umDcePQo0ppBQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z2yRs+lok2gKHp6N5s02bP4UyOa8f7vDuAGlRQ/TXyxqelZm2r6llllPJW0UGZe0A UmaW0KpfcH68JfUxWYXhN8ttVk6Lnb5iDkDaZ1n1al4OvJpK9un4aUz313S7ojmNWQ h3jy5+zbiPBALYpibYasyungjrcZwYKk2peiqWHI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Muchun Song , Michal Hocko , Mel Gorman , Luis Chamberlain , Sasha Levin Subject: [PATCH 5.18 144/231] mm: sysctl: fix missing numa_stat when !CONFIG_HUGETLB_PAGE Date: Tue, 19 Jul 2022 13:53:49 +0200 Message-Id: <20220719114726.478705779@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220719114714.247441733@linuxfoundation.org> References: <20220719114714.247441733@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 From: Muchun Song [ Upstream commit 43b5240ca6b33108998810593248186b1e3ae34a ] "numa_stat" should not be included in the scope of CONFIG_HUGETLB_PAGE, if CONFIG_HUGETLB_PAGE is not configured even if CONFIG_NUMA is configured, "numa_stat" is missed form /proc. Move it out of CONFIG_HUGETLB_PAGE to fix it. Fixes: 4518085e127d ("mm, sysctl: make NUMA stats configurable") Signed-off-by: Muchun Song Cc: Acked-by: Michal Hocko Acked-by: Mel Gorman Signed-off-by: Luis Chamberlain Signed-off-by: Sasha Levin --- kernel/sysctl.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/kernel/sysctl.c b/kernel/sysctl.c index f165ea67dd33..c42ba2d669dc 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -2466,6 +2466,17 @@ static struct ctl_table vm_table[] = { .extra1 = SYSCTL_ZERO, .extra2 = SYSCTL_TWO_HUNDRED, }, +#ifdef CONFIG_NUMA + { + .procname = "numa_stat", + .data = &sysctl_vm_numa_stat, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = sysctl_vm_numa_stat_handler, + .extra1 = SYSCTL_ZERO, + .extra2 = SYSCTL_ONE, + }, +#endif #ifdef CONFIG_HUGETLB_PAGE { .procname = "nr_hugepages", @@ -2482,15 +2493,6 @@ static struct ctl_table vm_table[] = { .mode = 0644, .proc_handler = &hugetlb_mempolicy_sysctl_handler, }, - { - .procname = "numa_stat", - .data = &sysctl_vm_numa_stat, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = sysctl_vm_numa_stat_handler, - .extra1 = SYSCTL_ZERO, - .extra2 = SYSCTL_ONE, - }, #endif { .procname = "hugetlb_shm_group", -- 2.35.1