Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp654665rdh; Thu, 23 Nov 2023 14:42:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHONZTF/oxikFBQdG3uga5XB19A1+CkDfweay1UiCmIEXrVOmGcFEvvi7JRf377IAxc8Bof X-Received: by 2002:a54:440e:0:b0:3b8:45a3:917c with SMTP id k14-20020a54440e000000b003b845a3917cmr927221oiw.23.1700779344878; Thu, 23 Nov 2023 14:42:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700779344; cv=none; d=google.com; s=arc-20160816; b=LWb2YhFuEo9Bv+qTGYjxhE76PpFrmPJuJmfXe3yHKKQIzi+iLvQNBpV9DzO74MadD6 9tiKfthXUcDyEDhNlNJn55yAVB9T/iuN8fDEWznfTGXOQfs6lxxbdkiVztQqz+S3MfgD Gs+jq0quDA+G/6z0R1yoj7OrycY8X/qeXlpVRQbqwWx6ax+25+YzoIRjqxgOADhSRXjz FRGr1GwYWnCOksI3gjK1qH134WLSpCuh/bbAlU94ui+SsdUfL6WCGRhemZyVcrUS+JZ1 piNhUJ5Zm9B2bQ6oFGE2XZlLu4+VTets7YKFXCQ/E4eMvFrVQtyWZZFbgS94lj8ffbSR W+6Q== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=uxvMU/Xo7MVeCzgBFSVtpLXkJ+M09hdrAxYgaD5WzoM=; fh=0UViIQX1WJL1114dNcS9+bAUgu5G8I35vuWI2T+7MLM=; b=svIl/HsfoHWgbnvfkUVLI+efNlmElPWjn60u9lrslLcDAiZUIw8HupafStpevAsSzG 1p+bTq6vFnVWfiRf2NL83R9gtBG/3rg5Zf2BCO4JEAHpoKHnFPSPMtpOVCH+L9XD03I7 jTKOAehD4GcqS5PGXs9BzcQcCVb1mg44GrfHyol9z0gBhu00yzpNo8tGqk/QWiAva2pt 22fzZ4UVbPrISpoy9uaM5PnUk7aqA1UTpFDO55hX3i7ldqcpU4YJoKRq14oWs4TIKRVh aFqqGwsdDncqDaDFdzgkjB3uxpy4GZ89Qoi0zEl+HdUVazrPbJi7WPeI+O3Qtwcia/wJ 35Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WgqYOoSn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id a13-20020aa78e8d000000b0068e256c6366si1970126pfr.352.2023.11.23.14.42.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 14:42:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WgqYOoSn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 7A77681F4710; Thu, 23 Nov 2023 14:42:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229718AbjKWWja (ORCPT + 99 others); Thu, 23 Nov 2023 17:39:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229477AbjKWWj2 (ORCPT ); Thu, 23 Nov 2023 17:39:28 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CCC1D54 for ; Thu, 23 Nov 2023 14:39:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700779174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=uxvMU/Xo7MVeCzgBFSVtpLXkJ+M09hdrAxYgaD5WzoM=; b=WgqYOoSnIjDn7BHCjxheDdIu0zArlUxzKHNEXCWwT+8iQRXtvBhac3PFrrhdATxgndfMUd I4PpJlJAXyWyc+COL4ts+zKZY66uNEE6wWbLf47UiUi7LIKvn+HF8XcMlJpE3WV33/D0Fw 2SRgMi8lKCFjHaazhX0QIY6jYCWyfI8= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-499-a2tobkelM2yaFdGp6a481w-1; Thu, 23 Nov 2023 17:39:32 -0500 X-MC-Unique: a2tobkelM2yaFdGp6a481w-1 Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-67a0921b293so2183016d6.1 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=DC/y27QPA+13ysKAA0XUb5pA8WWI31e/TKpSWnHblRrTGPWsuNbRQJSa+cm5F7usjq lJCAxEx70P7lHyyqofKnbzW34e78r0hGc1UANxjVFT6vD2lB9Wjan6rGKRb+yyMmgv6e PJO5Xpukivyx05hjuxfKA55TSz4WZvBVmB6gOOIKCh68N73R4b6eyQivKoC7YAKXtwDs rpih3JKDtQAokuuu4UrlOPbJgeCTpWcgXvxpxqdY+LN6vzTlgrpR1N13z+YXQfi8eOX3 JxF2b6Bvl1oUt+uTCADCuDvMOhXRrv4BcS7Z8+pb/aHgaA8Lc2uW3xT0dzJuXVrgdzCl gfFA== X-Gm-Message-State: AOJu0YxfGm9ghOsVaA9rHL5VCK1i1bwCsrn42aNbGiBdyB2mSZKh8gfa nGy3VUA+FKeHmsssqfVTOAgPs/VLeJREwFVDl7Zl1H7w+J5v0oFkK3iahkPzylkIQ7SropxeB67 kD+RkIrTys59ANzdDks4dLFfh8fOwqH8gEi0KTLuGA/3FlB+ILCscl1LKChhKKdVbVNoqysPtYc 77UHFwyQ== X-Received: by 2002:ad4:4242:0:b0:67a:11a9:e579 with SMTP id l2-20020ad44242000000b0067a11a9e579mr743244qvq.3.1700779171941; Thu, 23 Nov 2023 14:39:31 -0800 (PST) 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SORBS_WEB,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 23 Nov 2023 14:42:22 -0800 (PST) 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 -- 2.41.0