From patchwork Fri Nov 24 15:19:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 13467775 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 4A982C624B4 for ; Fri, 24 Nov 2023 15:19:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D3B568D008D; Fri, 24 Nov 2023 10:19:09 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CEBAC8D0084; Fri, 24 Nov 2023 10:19:09 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BB2448D008D; Fri, 24 Nov 2023 10:19:09 -0500 (EST) 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 AB03E8D0084 for ; Fri, 24 Nov 2023 10:19:09 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 7EA821A0BCD for ; Fri, 24 Nov 2023 15:19:09 +0000 (UTC) X-FDA: 81493206018.18.854E1F7 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf27.hostedemail.com (Postfix) with ESMTP id 49ED640021 for ; Fri, 24 Nov 2023 15:19:07 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=dTEtUABD; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf27.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.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=1700839147; 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=sUP0938eWxrh/qcHUeeo6YZetnQrjCIIyWqIBPJP/FA=; b=ZBv+T1fKSAySlz/yQMBj8z1ExZm1qzzaKcIR02jSKvUZc6tFB10SmePGesbZ3zKhsCJr+X N0EXgA08zIEgG5KptWkle9MYn+O01BKRtLoj9hdAxJF/LwbLKWEGIl3YXwPUXz9SSq/LmC ug9l6sutbfb7xs95VDvvydLW6z5/SU8= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=dTEtUABD; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf27.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1700839147; a=rsa-sha256; cv=none; b=Hw+4W4PcCdAg4z/72+Hl0v4yajdahM2aS7aVAlo6BzUGQbvv0eSXfx4A8E9UzCetxoNfgh fLet4wTULA2KZQSR/U33RRUHEQ4StOxqctppHyV83hZiIH7I9uvh+Brswhs70BHF1YdQS9 Rju1++/pRSXIa4/NLF1oJVtDSzUP+s4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700839146; 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=sUP0938eWxrh/qcHUeeo6YZetnQrjCIIyWqIBPJP/FA=; b=dTEtUABDq6NvygniHV6tb84dGPTtQekc0ISbSiDS4/JVAa7EyZ/CbLpgDLPOLH/63KqIzM bK6m/ylgX+Ii0kkL8CVwGu82Pb0BJYw5DDKCPwmUDL1cmuHQEa4XaoHCngH3lmqT5hWbKR INBP2OYkEB/79KZsAG3aRfzMjgn/Qfg= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-246-33_SwlM5OfCnR-EZLUHemA-1; Fri, 24 Nov 2023 10:19:05 -0500 X-MC-Unique: 33_SwlM5OfCnR-EZLUHemA-1 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-67a0921b293so4055646d6.1 for ; Fri, 24 Nov 2023 07:19:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700839144; x=1701443944; 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=sUP0938eWxrh/qcHUeeo6YZetnQrjCIIyWqIBPJP/FA=; b=txTj1VEobowdt0F8VLddwO+5qOq2bBMrlAOB649pt7qKQoyl1tTRI6bvbaOGcDITuQ GwoNbcVUPD3bdFaj4QYTpYjZfRZX3Q0PLCY0uHJZdYTZG/cXIUFaJVyRnpVTJ2uJ8qWe OAbHEiywf/n3WbKO5dWCtihXoJTGIlBUh9mlszwFZdfu0FDhntQiez53cZmdTU89BErf ZNovtOYQbSuczetwcJkPWaNRrp8GZs5XH8l44lfOKJTtaQhRpaTLXvQw9ZE+40c+3lIp Wv9DfIHht8RukbKwTVON0C988OEwySXYeIn/fBl6Nw76pJd/NogA1KG7puLxUO2nAb8x D5jA== X-Gm-Message-State: AOJu0YyAu09HP0S37aWu+znfHcPaPKvFsTZLCLOlRWlESNt5oNzMbO0t WTw/fVPIegWw33cGNLr1GTjLJpfnPg63ugnYiytTkl70f7sr7nmdYMAxFqKv1Vn7dAse09KBSlr fbWH4wAveFl7Tcxts7kQpesNl7HtqZOFVLHp3Qm3SZbEl/DFvi6f/MrqNc6YsjI7xavoc X-Received: by 2002:a05:6214:e62:b0:679:dfc4:a5b with SMTP id jz2-20020a0562140e6200b00679dfc40a5bmr3427604qvb.5.1700839144773; Fri, 24 Nov 2023 07:19:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IH65tZjZ4kmXbh/d9VdlWOCPV9PyBUVtyw/3egpKaKfZhkxUJBi3CqSgdCBKJPV4rh40sArzw== X-Received: by 2002:a05:6214:e62:b0:679:dfc4:a5b with SMTP id jz2-20020a0562140e6200b00679dfc40a5bmr3427564qvb.5.1700839144350; Fri, 24 Nov 2023 07:19:04 -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 kr6-20020ac861c6000000b004180fb5c6adsm1339987qtb.25.2023.11.24.07.19.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 07:19:03 -0800 (PST) From: Peter Xu To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: peterx@redhat.com, Andrew Morton , Mike Kravetz , Randy Dunlap , Muchun Song , linux-fsdevel@vger.kernel.org Subject: [PATCH v2] fs/Kconfig: Make hugetlbfs a menuconfig Date: Fri, 24 Nov 2023 10:19:02 -0500 Message-ID: <20231124151902.1075697-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-Rspamd-Queue-Id: 49ED640021 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 4f1mdy54x564s4egcxwsqk3katou5be4 X-HE-Tag: 1700839147-131744 X-HE-Meta: U2FsdGVkX19266ShKBVQOZOtzlZTc8WJFKABI+Kbgavmb3iItK/+QN64+Flt7O4L4fF5rToHDaZguynMuY/XJBdZQN24G1THTpUwY+lU/fS9qX2Hfux0wTwBbK6sjsXES3RlPxxnBlok79bNASmbUSrpoZmMqzRcifnawApT9lhs4VJ7iXB/azYh8WKXBIKLR768BT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rgSbozhKGfsJJE4Ky/GHfs5jTUuG+FyIFAxT1dUjxUfNRxAwlrOnaia03nmUz4B4DQbT/7o5Y8h3X51E3RRp8MTjZx4gv0pAwDzBdhCVTM5P5d4zNs5iYuxN0+K55HAE1fQTGurONRsVjYOKeFs/3Fsv22sjVHXBQi/ZC9IjOFQZ+ulYug3o32x7Z+TQ0LrQwR1Uyu9LcYgP+SvUKBb2tITJbUc6ExNvp4G1uyHLPYtNmQCezwXhFY784kbOw+9lDiWgXLgoXG1QsM1oS/vFoH1mmPw= 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. When moving it, fix a typo 'v' spot by Randy. Cc: Mike Kravetz Cc: Randy Dunlap Cc: Muchun Song Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Peter Xu Reviewed-by: Muchun Song --- v2: - Fix a typo in the relevant area [Randy] --- fs/Kconfig | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/fs/Kconfig b/fs/Kconfig index fd1f655b4f1f..0b404e61c80b 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,22 +266,24 @@ 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 depends on HUGETLB_PAGE_OPTIMIZE_VMEMMAP help - The HugeTLB VmemmapvOptimization (HVO) defaults to off. Say Y here to + The HugeTLB Vmemmap Optimization (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