From patchwork Fri May 27 08:19:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muchun Song X-Patchwork-Id: 12863117 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 D6B96C433F5 for ; Fri, 27 May 2022 08:20:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1F4068D0008; Fri, 27 May 2022 04:20:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 19F528D0002; Fri, 27 May 2022 04:20:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 08DA48D0008; Fri, 27 May 2022 04:20:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id F07D28D0002 for ; Fri, 27 May 2022 04:20:08 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id C3B1180FC9 for ; Fri, 27 May 2022 08:20:08 +0000 (UTC) X-FDA: 79510825296.30.3B10590 Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by imf13.hostedemail.com (Postfix) with ESMTP id BDE922009D for ; Fri, 27 May 2022 08:19:38 +0000 (UTC) Received: by mail-pf1-f173.google.com with SMTP id c14so3768535pfn.2 for ; Fri, 27 May 2022 01:20:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Z1Aq17dHELJ872l+t8fXkD03dN9Wq38KxjIxdkA2X6s=; b=uEnODR0keCyU9dqcQdNE62D84XuwSxmZfz1vsz4MRUBXf8TYXzJc9D+ZOj4mikUGqn 58dpLjjrv6LfusGiQslMj3pLvzW6F+86n9BafXIEu4OqEj8VstNSI61ovuvpYSEZ1Qea 4dEAohjprmCxAwHtIuHdaapmh364Y8EFuTDRB128YVVsObUxJoiyIZk5bTjDpUcdKAvt O8p0H5474Dk7iHftFZEirHMO6aztQecenOUpMrhA862vBILtQ8d5zx8Da9nFEsFUGPtL 7QJ5GFkarhFfZu+bYytYx/67rJ//Ef4Wh5C4qn4qD4ysRt1vDQ/TzZthTRGl0AHY9GSB rDCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Z1Aq17dHELJ872l+t8fXkD03dN9Wq38KxjIxdkA2X6s=; b=yUfXIJAlAVBfBEhRm93oppvZh1LC61BesRa1eW2NLZf9+iYClS9ZsFTi+Jhf35L1JP FKyhtrBbXY8A7fK7EEuKL2SQ089cb6i/KVHl17UnRngMs/EaoVGjlDn6e9AsrnKehQQo 1hAm92UpaM5jyur2h2xWRxA08Ze6BozJMlbWVF63/GB7/zkTR6NKyttn2lzKx2fB7egr O2J8BwQTWrihe3QzFGfYMeCi96vR2DCgLGX2mRwj+AVTPqM6mH9Jb5P7bYJnjO/oafZM 6i64qgvHrgXsdj7EUISp2xChni5wYr+cQ0D9QdjSiZQaZ7cWze7r6hIqhjoJQdwkO4vt +wuw== X-Gm-Message-State: AOAM533voM1oe2gKSAOsqAIZ7pw/ZP2ccdm51gID5xd+hbiulMBjU9xr COQlrcFjrMA7BG/yOT7g6jgxww== X-Google-Smtp-Source: ABdhPJymr23LhnSRkNCgCaPC3sfshR0/m7N9PN1di24h5o0dp7yfwDHsnZuZXkYKMrMzQqnjeVwcgA== X-Received: by 2002:a63:5fcf:0:b0:3f6:298d:e2ea with SMTP id t198-20020a635fcf000000b003f6298de2eamr37127841pgb.561.1653639606843; Fri, 27 May 2022 01:20:06 -0700 (PDT) Received: from FVFYT0MHHV2J.bytedance.net ([139.177.225.238]) by smtp.gmail.com with ESMTPSA id y139-20020a626491000000b0051844a64d3dsm2865931pfb.25.2022.05.27.01.20.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 May 2022 01:20:06 -0700 (PDT) From: Muchun Song To: akpm@linux-foundation.org, mike.kravetz@oracle.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Muchun Song , Vlastimil Babka Subject: [PATCH] mm: hugetlb_vmemmap: fix CONFIG_HUGETLB_PAGE_FREE_VMEMMAP_DEFAULT_ON Date: Fri, 27 May 2022 16:19:48 +0800 Message-Id: <20220527081948.68832-1-songmuchun@bytedance.com> X-Mailer: git-send-email 2.32.1 (Apple Git-133) MIME-Version: 1.0 X-Stat-Signature: fnyiwaxsauc9n7d5rxnssggj3d33dizt X-Rspam-User: Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=uEnODR0k; dmarc=pass (policy=none) header.from=bytedance.com; spf=pass (imf13.hostedemail.com: domain of songmuchun@bytedance.com designates 209.85.210.173 as permitted sender) smtp.mailfrom=songmuchun@bytedance.com X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: BDE922009D X-HE-Tag: 1653639578-755249 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: The following: commit 47010c040dec ("mm: hugetlb_vmemmap: cleanup CONFIG_HUGETLB_PAGE_FREE_VMEMMAP*") forgot to update CONFIG_HUGETLB_PAGE_FREE_VMEMMAP_DEFAULT_ON used in vmemmap_optimize_mode to CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON. The result is we cannot enable hugetlb_optimize_vmemmap at boot time when we configure CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON. Fix it. Reported-by: Vlastimil Babka Fixes: 47010c040dec ("mm: hugetlb_vmemmap: cleanup CONFIG_HUGETLB_PAGE_FREE_VMEMMAP*") Signed-off-by: Muchun Song Acked-by: Vlastimil Babka --- mm/hugetlb_vmemmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/hugetlb_vmemmap.c b/mm/hugetlb_vmemmap.c index fcd9f7872064..1089ea8a9c98 100644 --- a/mm/hugetlb_vmemmap.c +++ b/mm/hugetlb_vmemmap.c @@ -33,7 +33,7 @@ DEFINE_STATIC_KEY_MAYBE(CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON, EXPORT_SYMBOL(hugetlb_optimize_vmemmap_key); static enum vmemmap_optimize_mode vmemmap_optimize_mode = - IS_ENABLED(CONFIG_HUGETLB_PAGE_FREE_VMEMMAP_DEFAULT_ON); + IS_ENABLED(CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON); static void vmemmap_optimize_mode_switch(enum vmemmap_optimize_mode to) {