From patchwork Fri Aug 26 09:24:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12955714 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E70D5ECAAD7 for ; Fri, 26 Aug 2022 09:25:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BD7406B0083; Fri, 26 Aug 2022 05:24:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B5CBD940007; Fri, 26 Aug 2022 05:24:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8512F6B0087; Fri, 26 Aug 2022 05:24:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 72E166B0083 for ; Fri, 26 Aug 2022 05:24:59 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 52E72A0EA7 for ; Fri, 26 Aug 2022 09:24:59 +0000 (UTC) X-FDA: 79841209518.21.AB96134 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf14.hostedemail.com (Postfix) with ESMTP id D52F4100019 for ; Fri, 26 Aug 2022 09:24:58 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MDZ8f6JyGzlWP2; Fri, 26 Aug 2022 17:21:38 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 26 Aug 2022 17:24:55 +0800 From: Miaohe Lin To: , , CC: , , Subject: [PATCH 10/10] hugetlb: make hugetlb selects SYSFS if !SYSCTL Date: Fri, 26 Aug 2022 17:24:22 +0800 Message-ID: <20220826092422.39591-11-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220826092422.39591-1-linmiaohe@huawei.com> References: <20220826092422.39591-1-linmiaohe@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661505899; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JpQzFCj5j8N05ez9gfTI6B3oyWTxVmfJOVLQilhQau4=; b=25RQpAIxj5KOKQ06+keWI00nXFqPE4ezTP9nEv69NYropyOGoW6lkkhDjs/b9hGXwUZMi9 CH1twd5AaUO8CGkUYlfH92MNWdEhW0xDBwEfXSr97gD723W8xdSKbgnktUc3xkASr/VyW/ e36kBNdwQyAV+J1fpG98N6ojdZg6bgs= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf14.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661505899; a=rsa-sha256; cv=none; b=qxbdzEWMCGIBF6zu1jofwn1EI4/dapqFGIjE/XkIrLAy8rtILl5ZL6cDE1/W9v9ua5b3aM 3czdJgP2fD7u2/3mhKDnmYjXa9kzzd4s6df+g0ORT5k1z85f5NDvyxrJAj9cGYL2lshTxK KFgGjZI4faIV6/KV0lDdHBZpj1dkoUo= Authentication-Results: imf14.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf14.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-Rspam-User: X-Rspamd-Queue-Id: D52F4100019 X-Rspamd-Server: rspam10 X-Stat-Signature: fp5corjta1h44tkej7yzgt5niwfc9udk X-HE-Tag: 1661505898-733291 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: If CONFIG_SYSFS and CONFIG_SYSCTL are both undefined, hugetlb doesn't work now as there's no way to set max huge pages. Make sure at least one of the above configs is defined to make hugetlb works as expected. Signed-off-by: Miaohe Lin --- fs/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/Kconfig b/fs/Kconfig index a547307c1ae8..b266e7b5de85 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -235,6 +235,7 @@ config ARCH_SUPPORTS_HUGETLBFS config HUGETLBFS bool "HugeTLB file system support" depends on X86 || IA64 || SPARC64 || ARCH_SUPPORTS_HUGETLBFS || BROKEN + select SYSFS if !SYSCTL help hugetlbfs is a filesystem backing for HugeTLB pages, based on ramfs. For architectures that support it, say Y here and read