From mboxrd@z Thu Jan 1 00:00:00 1970 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 294E5ECAAD4 for ; Sat, 27 Aug 2022 02:34:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6A2376B0074; Fri, 26 Aug 2022 22:34:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 651BD6B0075; Fri, 26 Aug 2022 22:34:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5406A940007; Fri, 26 Aug 2022 22:34:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 44A0F6B0074 for ; Fri, 26 Aug 2022 22:34:35 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 10E6416066E for ; Sat, 27 Aug 2022 02:34:35 +0000 (UTC) X-FDA: 79843804110.08.389BE78 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf14.hostedemail.com (Postfix) with ESMTP id 551A410001C for ; Sat, 27 Aug 2022 02:34:34 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MF10d0g98zlWHk; Sat, 27 Aug 2022 10:31:13 +0800 (CST) Received: from [10.174.177.76] (10.174.177.76) 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; Sat, 27 Aug 2022 10:34:30 +0800 Subject: Re: [PATCH 10/10] hugetlb: make hugetlb selects SYSFS if !SYSCTL To: Muchun Song CC: Andrew Morton , Mike Kravetz , Muchun Song , , References: <20220826092422.39591-1-linmiaohe@huawei.com> <20220826092422.39591-11-linmiaohe@huawei.com> <1BAFF85D-F7F5-4DD1-ABEF-2FF621DE34E8@linux.dev> From: Miaohe Lin Message-ID: <7040e50b-fe4c-4d1d-fd8d-94c29b6e1668@huawei.com> Date: Sat, 27 Aug 2022 10:34:30 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <1BAFF85D-F7F5-4DD1-ABEF-2FF621DE34E8@linux.dev> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.177.76] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661567674; a=rsa-sha256; cv=none; b=dkINgoQqdlWiPTyHeH/ZOhecSz8/GMzv3JMdZAuvIif7ImiKJkO1TrTFvvJYZMFWTBOsm/ ObvgsazrigxEP/GiTFqGkbUqMuvAnjgfbbkd/2NQRcnho+Q4tBKaKMgOK3M8LHr3Xh+xto dxMGQzKzMK2R0rbx/lpCW3nCo4Pqhpw= 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661567674; 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=cR+zbgaubzDWxAGmsOPA+iXYq429gcSv0XG/OObgHRY=; b=cVfS/K2TI7R+kzexEsj/yJjjkfpJnn1/O6BsFGG89RMmwYzdkcGaQ/E2hCOc8I7ns6/oAh ll37jS4H5RhXwTleq7KQicpX8+rwd96MUhc6oLHcaG38NTvUXKQR6SoGw8oVFNB8hjOcFS u5H9Uu+BSs3U/r71P4pdzgckL1XMMIk= X-Rspamd-Server: rspam11 X-Rspam-User: X-Rspamd-Queue-Id: 551A410001C 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-Stat-Signature: 68xw68ewhtatca8415wkjaxatscnd8t9 X-HE-Tag: 1661567674-919842 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: On 2022/8/27 9:59, Muchun Song wrote: > > >> On Aug 26, 2022, at 17:24, Miaohe Lin wrote: >> >> 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. > > Right. I think the majority of the people are usually use /proc knob to > reserve HugeTLB pages than /sys fs. So I suggest to add a “depends on SYSCTL” > item. What’s your thoughts? It seems some functions, e.g. demotion, is exported via SYSFS instead of SYSCTL. So maybe "depends on SYSFS || SYSCTL", i.e. depends on (X86 || IA64 || SPARC64 || ARCH_SUPPORTS_HUGETLBFS || BROKEN) && (SYSFS || SYSCTL) will be more suitable? Thanks, Miaohe Lin