Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4444228imw; Tue, 19 Jul 2022 06:46:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sdV3IeuN4hOEE5ZEHo8HsO6ISARHYMUKXNvAqPbOZV6HJzL2Smqgn+Fc1sDuNwjZOrcWkZ X-Received: by 2002:a17:907:3e8c:b0:72b:4f2d:782b with SMTP id hs12-20020a1709073e8c00b0072b4f2d782bmr29677400ejc.223.1658238405436; Tue, 19 Jul 2022 06:46:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658238405; cv=none; d=google.com; s=arc-20160816; b=xbqVystOpGFkC6Wsn5hzMPqQ9R5lvCz/FG/6l8wrPjWz5alItxkxEkvpT8yEFz4H9C us2BO1mrOG2jIGIefUtKfVtFNod5g3WrbPXStnry4eeiokd21253fXDMab712JXa0wHY LgsxS3p5sGNWfz4GNiv9g36CLZu5JuvGViSPV4OWEZjkYyq04iKOtJfFenCdkOS6GUXl IMQxPBrpHTvf9r/132BtVLFpO1SmxZtuzCMSj+1bDPkyrfPo5HC2ELqtnHeKtHtcE7ms 4mXkcN+sBJjaQ/ge9D1/mNBBtZrYIi/ukIHWMWlSZ2AfAbOobLq0F/ImmdX5RUHssD7z P0Jw== 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=b7UH6M9GXU37m2P4pGbIiusXJzpBzVBvfX559s0lcYs=; b=rP9I9o/AORwBp7V7BkNNPNznCSpDyRqhPOL4u8DnkAzQKcCeLl/Wgcxig4oMFwp+n/ 6bGcYlFKC0H70+agO+pXXKuVI+53VwqIr9DHY2ZzeIkDg233Ky0mc/WAEd9rK5LOhoBL OxZBoA1Zcn6n5jydn3rM4P4qbHn/J+16I3r+4FWZ/ugaWBlJieLuj/HoqaGCu0nLz9dX u1dD7BFw2tyULiKuI3l6dH43kTiRoE6I37Ehi0II6+pLTH0VtVrXHP6R8Du9RRae4Od6 69Zo0TtrKZCHDAINf8FsatvyUQFREruCtZyaJM3Gsa6FgQrYvRL7nvE+umIKR27E2j87 82pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yAwvAFoJ; 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 ji17-20020a170907981100b0072ae7302377si25730538ejc.527.2022.07.19.06.46.19; Tue, 19 Jul 2022 06:46:45 -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=yAwvAFoJ; 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 S238710AbiGSMMG (ORCPT + 99 others); Tue, 19 Jul 2022 08:12:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239095AbiGSMKK (ORCPT ); Tue, 19 Jul 2022 08:10:10 -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 AB24651A30; Tue, 19 Jul 2022 05:03: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 63ED7B81B25; Tue, 19 Jul 2022 12:03:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B734BC341C6; Tue, 19 Jul 2022 12:03:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658232193; bh=ooT52oZsc7rbGbyKNG1QdXiXbev9DbiopPUeTRbdqKc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yAwvAFoJGvLAqqbLY4Y2Lu/ZSKiv3wIm8zzcCQkfA4JFqbx2pIDehMhKFfCiILF5l u24tcbawkcT2YjKIPzrZmSmA7yswFk787YF8GN4dAUKZEnDTSkEd6Kk2PR2sdOmrYN NpgeDj8eMZHJCS7Pd0i8oTsKTKfBis6QQeI9C760= 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.4 44/71] mm: sysctl: fix missing numa_stat when !CONFIG_HUGETLB_PAGE Date: Tue, 19 Jul 2022 13:54:07 +0200 Message-Id: <20220719114556.573182494@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220719114552.477018590@linuxfoundation.org> References: <20220719114552.477018590@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 0457d36540e3..6f971807bf79 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -1443,6 +1443,17 @@ static struct ctl_table vm_table[] = { .extra1 = SYSCTL_ZERO, .extra2 = &one_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", @@ -1459,15 +1470,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