Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4372850imw; Tue, 19 Jul 2022 05:33:34 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tkX8K3TvCROSs4HzDSQVYmCSh3C6IFd/E2LZ0fEehAwP6ZKI4CpoNs2jJ6axVo4MemuQf2 X-Received: by 2002:a05:6402:104f:b0:43b:a44b:cff3 with SMTP id e15-20020a056402104f00b0043ba44bcff3mr848189edu.140.1658234014268; Tue, 19 Jul 2022 05:33:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658234014; cv=none; d=google.com; s=arc-20160816; b=UFKl0+XfSoOgT6IHCNRrEEvcX627aKGFuZXqzJ33RqyluGO85huGqFKLQEJS/Ey6ST NN29DyUqRiXYuTrt392NmyqUPk9HTgxJGMAE9jnry8dBmjZLLp8nmNoDa+q6cv6t3HbV HaZ7WYYj+1hZkvviNcgDoHiEpFouNCH1UXvDybSU8/YOpBwH6In47+/MSX2DXDuksmNE 7cK14hqmVE+orqEEDX8lNjy4IJR1SK0+cYIHll42zE6oQQZVugRWa9Owc/e685lU9Dks 0iNdPuWg+7eCh5QUo7MZv8Tu71S2JfjG+cUiH/DDh1pSnZsm6W4vgFlrGirGALyvFypu VLaw== 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=UPyk8yzX1zQ9wBTumXAsamqOqSiteyR5PiOoCSZJbqg=; b=IJHqDAjwNr+2NAvvpbL5xPURrtlju7jp5IE/qUFet8NQ8qHpqAwyeTbQnJNSPc5p44 kon5JavWFWRK1PEOfLhwdaq2ypozbLfnChEU348ZENjHcm+rV7jsLUAmDWiayz7pwpjK 1+V8Rh8dit1k1vlN1/xQsbVRaSDDJr3N/i8KyfmHCxnpu903tIAa0Ec90va0VtLS9LKw EksMhOs5MCkzNJKfl+YliszVeTg7K8pmqGRLWsbgsVq0nCWxCNzd3xcuYRzcXBAvysOk GgHlCtccY6hWWsnT/EQDcx1jlqnYvQ3/qwQKnrTRLIPidxsFXcNFHX4JTwAMFmoc6YsV 5lFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fW8p1poc; 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 hq28-20020a1709073f1c00b00726f11c4c8esi24785578ejc.669.2022.07.19.05.33.09; Tue, 19 Jul 2022 05:33:34 -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=fW8p1poc; 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 S239560AbiGSMXH (ORCPT + 99 others); Tue, 19 Jul 2022 08:23:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237158AbiGSMWp (ORCPT ); Tue, 19 Jul 2022 08:22:45 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F6845C9F0; Tue, 19 Jul 2022 05:08:15 -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 E9FBDB81B2D; Tue, 19 Jul 2022 12:08:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51A7CC341C6; Tue, 19 Jul 2022 12:08:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658232493; bh=k+Tu//v3Z55vK2wD/Q2gYMc9MWPu5n5sxYJ0bnVBsIc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fW8p1poc6VtWlFzFTNQeo9o4Em4/y7Mj6y5mKXA97oe+2YxIyHerV4VHpTECE0CPp AQK5uWqtFiCp2+bIleKUDCoT44v3VbZ8c05cHWIt5aZQ1XUMHElX7CCWOYi536WmpT cFKzAdf0kw26uWkHfVqE2lmbDsj4jI2+usS5ShNc= 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.10 076/112] mm: sysctl: fix missing numa_stat when !CONFIG_HUGETLB_PAGE Date: Tue, 19 Jul 2022 13:54:09 +0200 Message-Id: <20220719114633.857941717@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220719114626.156073229@linuxfoundation.org> References: <20220719114626.156073229@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 642dc51b6503..f0dd1a3b66eb 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -2814,6 +2814,17 @@ static struct ctl_table vm_table[] = { .extra1 = SYSCTL_ZERO, .extra2 = &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", @@ -2830,15 +2841,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