From patchwork Thu Nov 23 22:39:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 13466798 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 520E6C61DF7 for ; Thu, 23 Nov 2023 22:39:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 719E66B06BE; Thu, 23 Nov 2023 17:39:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6C9956B06C0; Thu, 23 Nov 2023 17:39:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 56BE76B06C2; Thu, 23 Nov 2023 17:39:39 -0500 (EST) 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 485CB6B06BE for ; Thu, 23 Nov 2023 17:39:39 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 25FD01CB254 for ; Thu, 23 Nov 2023 22:39:39 +0000 (UTC) X-FDA: 81490687278.10.B139716 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf11.hostedemail.com (Postfix) with ESMTP id 3B7E740007 for ; Thu, 23 Nov 2023 22:39:36 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="aDuvkM/b"; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf11.hostedemail.com: domain of peterx@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=peterx@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1700779176; 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: references:dkim-signature; bh=uxvMU/Xo7MVeCzgBFSVtpLXkJ+M09hdrAxYgaD5WzoM=; b=DWaGYzevU5Iv75voDw+fscWq1rKmOJj0prCuXOMiewdKu7XnRcNwj6glYmLpdtpeMNjq/1 hOQ+Fl1a2aa/S2/OVU0NVFh1kSuW9o7nFr5OpvlocKDDU1CxsVNLNbnYhjSSaLBZIqUwiT UiccpRvxj6or0mZVLQk9BwVhHS4eMRw= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="aDuvkM/b"; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf11.hostedemail.com: domain of peterx@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=peterx@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1700779176; a=rsa-sha256; cv=none; b=HGpn7pl/oWSzM4GHcrpieIcKEX3X1cHueOoyytoHbmeROCnIBvbrnOCKVDe2O0ZpmfqeT0 prIN6bENysxJY1+7xsin7eTlxrBYXGrXVg3mTxCQw2O9LYWuY/CnuM2Ni6JLHmNUebUP2y EXjSfREGP1Vl7iXNU6yNcDiB4omN0Go= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700779175; h=from:from: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; bh=uxvMU/Xo7MVeCzgBFSVtpLXkJ+M09hdrAxYgaD5WzoM=; b=aDuvkM/bdqrPDCCXQyeDJaFluAVFy7bmhvXTvazwHCh3bO7eSG0E+veWNv8+FXozcQq8YJ AQrHe2nKwgKXgflLwmJ8mfP2Ow6Quod2nf7vADmMa1+qG41ONUf5Xi8FLr1gNnrMJNAJvs fbKCr0lxo8tS3U0HmPJvg4zbYo/Jst8= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-255-2_NIjZSkM92T7yRPHQZa5w-1; Thu, 23 Nov 2023 17:39:32 -0500 X-MC-Unique: 2_NIjZSkM92T7yRPHQZa5w-1 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-679d8383224so3241716d6.0 for ; Thu, 23 Nov 2023 14:39:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700779172; x=1701383972; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uxvMU/Xo7MVeCzgBFSVtpLXkJ+M09hdrAxYgaD5WzoM=; b=BhT4hdsNAOKhdxCbG/x4d/bA/ZPfi7pZuUcb7156MT4grukyMLeNEL0qQSy2v1dGTZ Ez2MgEyNOQZIPQapl0KU570w9W5y/9MwZLmv8YRS52kAkxb/agMHjbNldjiVipFF/rSi XJbQ1rM5d5A3wmXQ2vhtIUhC9Hrc38pHXT14qMGAraOwa9xapq3ST1N95YFoyPye+gh3 OVFaUbWs97hItCBNlf5GoTwISZcLBm0RcTaPD/BRQhLUakpN6KeNXCRgIcd24+XdyiD6 e1Xu2upo8kWfDhkZTab8dYSJnVDZwuXLFnJ0rmMwz43yalq4ieoQawKjdGRbqvuxrfLC g/WQ== X-Gm-Message-State: AOJu0Yye815rZfqi68MP9/hxgH8lehzSl84vbvpOcT6gQjSeJEAu+jqb utoudqZnK3TsyhwBS0nEJJE9ka0mnDENpSck42p73C/h7bRvhuGUtEOnk1GBNCZ1JEGKMVU5gy1 MW4Z5HbaDU9k= X-Received: by 2002:ad4:4242:0:b0:67a:11a9:e579 with SMTP id l2-20020ad44242000000b0067a11a9e579mr743240qvq.3.1700779171813; Thu, 23 Nov 2023 14:39:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IFvUeYsikfky/jSIEaAUmbV6X8zYGpERKvvHbE6LK2W5XgyAicVdgusWE5DO059Yw/o9j2ixA== X-Received: by 2002:ad4:4242:0:b0:67a:11a9:e579 with SMTP id l2-20020ad44242000000b0067a11a9e579mr743224qvq.3.1700779171591; Thu, 23 Nov 2023 14:39:31 -0800 (PST) Received: from x1n.redhat.com (cpe688f2e2cb7c3-cm688f2e2cb7c0.cpe.net.cable.rogers.com. [99.254.121.117]) by smtp.gmail.com with ESMTPSA id n11-20020ad444ab000000b0067a08bba0bbsm774131qvt.0.2023.11.23.14.39.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 14:39:31 -0800 (PST) From: Peter Xu To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: peterx@redhat.com, Andrew Morton , Mike Kravetz , Muchun Song , linux-fsdevel@vger.kernel.org Subject: [PATCH] fs/Kconfig: Make hugetlbfs a menuconfig Date: Thu, 23 Nov 2023 17:39:29 -0500 Message-ID: <20231123223929.1059375-1-peterx@redhat.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 3B7E740007 X-Stat-Signature: adq47czrtymmigafg4paomz5r9zm7y4h X-HE-Tag: 1700779176-908712 X-HE-Meta: U2FsdGVkX1+/4f21tVDgbFiHvG4hS6b2gbM/wVwQb3Ndp1+vx8gs9M/urPNDblcgUuN364KA29FtTHhHie4jXZQJRXDyY0dWe5Ujd1erV2jThvBAJLDLfHRHvCoX0ouhD9qMa358gR6da7hDzdQoJD/7sBJDVTzJkgEjx2AijlpJSRNzG+Kw2G+B6VQsOgkeYPc25ZdR9v6uL405Y3m51U1Z1ZAZI5aznhFrrVbt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h6XOe9X0ENe0G8NwN3/WThzrmzXE18DC0ms1fu8t0YDFX3Nn82dFdZgpi69R/yjz1V5Zo29pwCEK/PVdF/GL+BPGqSNGa6lFogBQDvfwKrO3ZQNozLVw9nsCpoPEk+7fSXqYwng+NAFJ1u14psAdS988VqDT1CUicIef/SDR6P5FB7ifOv80edSymwoZ81H7W6eonD2JSMTSxKyxTbfTFGxNA== 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: List-Subscribe: List-Unsubscribe: Hugetlb vmemmap default option (HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON) is a sub-option to hugetlbfs, but it shows in the same level as hugetlbfs itself, under "Pesudo filesystems". Make the vmemmap option a sub-option to hugetlbfs, by changing hugetlbfs into a menuconfig. Cc: Mike Kravetz Cc: Muchun Song Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Peter Xu --- fs/Kconfig | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/fs/Kconfig b/fs/Kconfig index fd1f655b4f1f..8636198a8689 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -254,7 +254,7 @@ config TMPFS_QUOTA config ARCH_SUPPORTS_HUGETLBFS def_bool n -config HUGETLBFS +menuconfig HUGETLBFS bool "HugeTLB file system support" depends on X86 || SPARC64 || ARCH_SUPPORTS_HUGETLBFS || BROKEN depends on (SYSFS || SYSCTL) @@ -266,14 +266,7 @@ config HUGETLBFS If unsure, say N. -config HUGETLB_PAGE - def_bool HUGETLBFS - -config HUGETLB_PAGE_OPTIMIZE_VMEMMAP - def_bool HUGETLB_PAGE - depends on ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP - depends on SPARSEMEM_VMEMMAP - +if HUGETLBFS config HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON bool "HugeTLB Vmemmap Optimization (HVO) defaults to on" default n @@ -282,6 +275,15 @@ config HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON The HugeTLB VmemmapvOptimization (HVO) defaults to off. Say Y here to enable HVO by default. It can be disabled via hugetlb_free_vmemmap=off (boot command line) or hugetlb_optimize_vmemmap (sysctl). +endif # HUGETLBFS + +config HUGETLB_PAGE + def_bool HUGETLBFS + +config HUGETLB_PAGE_OPTIMIZE_VMEMMAP + def_bool HUGETLB_PAGE + depends on ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP + depends on SPARSEMEM_VMEMMAP config ARCH_HAS_GIGANTIC_PAGE bool