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: 169130 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp751985vqx; Thu, 23 Nov 2023 14:42:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IGMNi5qGPxzJc8CHvB8k6dJGIVjtLrepBwqq87zjC5WR0AO3slhJQ1KDdcVcSa0M8tch6Nj X-Received: by 2002:a05:6870:1494:b0:1e9:a19b:3126 with SMTP id k20-20020a056870149400b001e9a19b3126mr890120oab.15.1700779341369; Thu, 23 Nov 2023 14:42:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700779341; cv=none; d=google.com; s=arc-20160816; b=mokeTGUo17xr+dNz8BUaYpe/gFToVIDR+mTRNDIJpol4fU2QwODSSOJ/dtGQXVev4t R0DESmnqScHyF/Ib8z0SoDahF58Cw4Tw2xvhoNqgKKnAsqaLJ5IzkgF/GveY5ObMA5q5 5zu57G5manl9kSBncUbcN0b0p8csfv11G3G9SBvhBhV2NNWbL5RY6TlA0pxdCv9nd9pH XfGv6STvl0dXauroXA7x1T+fGomF9i3CivPsEr0CmHHGyA0Xut9yTohc0u+gt7wdFd5l sEqtk7Is2b6w/oWkOARlRxawvrbmEcB1epLrBMUvx4MxuAHyHV1EsIC+MtgRiDg8diNG dlbg== 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 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id z125-20020a626583000000b006be322191desi1950389pfb.112.2023.11.23.14.42.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 14:42:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; 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 2620:137:e000::3:2 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 1233281F470E; Thu, 23 Nov 2023 14:42:19 -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 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:19 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783396398874662639 X-GMAIL-MSGID: 1783396398874662639 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