Message ID | 20210430031352.45379-3-songmuchun@bytedance.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=xn6i=J3=kvack.org=owner-linux-mm@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E84EC433ED for <linux-mm@archiver.kernel.org>; Fri, 30 Apr 2021 03:20:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B3B8D61445 for <linux-mm@archiver.kernel.org>; Fri, 30 Apr 2021 03:20:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3B8D61445 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=bytedance.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4DC116B007E; Thu, 29 Apr 2021 23:20:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 489276B0080; Thu, 29 Apr 2021 23:20:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2DD7B6B0081; Thu, 29 Apr 2021 23:20:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0038.hostedemail.com [216.40.44.38]) by kanga.kvack.org (Postfix) with ESMTP id 1072E6B007E for <linux-mm@kvack.org>; Thu, 29 Apr 2021 23:20:38 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id BE340181AF5C3 for <linux-mm@kvack.org>; Fri, 30 Apr 2021 03:20:37 +0000 (UTC) X-FDA: 78087580914.24.D109DC5 Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by imf13.hostedemail.com (Postfix) with ESMTP id 4DC96E000120 for <linux-mm@kvack.org>; Fri, 30 Apr 2021 03:20:28 +0000 (UTC) Received: by mail-pg1-f175.google.com with SMTP id q10so48526059pgj.2 for <linux-mm@kvack.org>; Thu, 29 Apr 2021 20:20:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SoZb++zfv4yAwjnBuF75FK8ZgZmHYksA4MNIPLiTWic=; b=mlyV38kwzZqnfRIFSmO3Lzu/ptALUHfqbXSA1aV0ptvicemXcM1txUuxdvQLqZdf5l HLS765hW/rWEKW9ecF/6BtofGKaA+n6Bs2Q7DJrotWxBFrvb3JPN5oY/J6+uF8Ugu5Ns TSCmNCq1dr2/V/9bBDmHqlKirDqMgOIcfVnHBz6yqZGJdbpGkPUc89ttao4Sdg8wCZyi OZUnh72X5HlgC2/WNdIhQUrWrquMx1eeaAl9D6JbADRcEnCP9x7wvWNogDYd3LcnhZ/2 zh5ezjT+4USCuscbPhNqVcfS0nLviUGV+q9S7Q242eE37aWxeaNq+RDt+CHQP8ddxHrF dtWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SoZb++zfv4yAwjnBuF75FK8ZgZmHYksA4MNIPLiTWic=; b=aqIUNFbAsKEHB90oIhxcrHTBZRvqypJJIJHCg0OwEuLrozEZsqYL7MWiHs8Abp/CCI I4Ye3sgxSdhmzHK9wioI+wVmR2CvcVCckl2Qd2MxHUIHiBhU/x7mrfaJW57VC+3Rga+h 9+rXPaWmVPXhaZOGx1KcN2dDf2U9XWIFQPsfrOdO9PB2NPv0fDNvmJs9OuuIHDExWMQj BVaHfA/9TCkLLcrb6MQy15sCVCs3dRcMuHbfmbdpT0mrtnb978nirlRfJiN0uASjRJUu 9oqrj5qqAoUPlDPOa3/pdRBeYI8TFshpDCn0loHtcVT8cF7UE9bJI6M9VwnL6J+pI/rR Je1g== X-Gm-Message-State: AOAM533kDWLeklvoRsk1AeJ+wBOY5tTMUMiZVtR8yH7eR0iR5D4431rk y6ESnb4izRw+7v1nQwifi4qu3Q== X-Google-Smtp-Source: ABdhPJxmzeuvpPgk9GmyFCzB6g3eCpDFvfRsjXYrtKKIR7iA2IIslOyy4I+cKXCJ69KydA6HMKNjOQ== X-Received: by 2002:a63:575b:: with SMTP id h27mr2823285pgm.180.1619752836465; Thu, 29 Apr 2021 20:20:36 -0700 (PDT) Received: from localhost.localdomain ([139.177.225.239]) by smtp.gmail.com with ESMTPSA id t6sm405317pjl.57.2021.04.29.20.20.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Apr 2021 20:20:36 -0700 (PDT) From: Muchun Song <songmuchun@bytedance.com> To: corbet@lwn.net, mike.kravetz@oracle.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, viro@zeniv.linux.org.uk, akpm@linux-foundation.org, paulmck@kernel.org, pawan.kumar.gupta@linux.intel.com, rdunlap@infradead.org, oneukum@suse.com, anshuman.khandual@arm.com, jroedel@suse.de, almasrymina@google.com, rientjes@google.com, willy@infradead.org, osalvador@suse.de, mhocko@suse.com, song.bao.hua@hisilicon.com, david@redhat.com, naoya.horiguchi@nec.com, joao.m.martins@oracle.com Cc: duanxiongchun@bytedance.com, fam.zheng@bytedance.com, zhengqi.arch@bytedance.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Muchun Song <songmuchun@bytedance.com>, Miaohe Lin <linmiaohe@huawei.com>, Chen Huang <chenhuang5@huawei.com>, Bodeddula Balasubramaniam <bodeddub@amazon.com>, Balbir Singh <bsingharora@gmail.com> Subject: [PATCH v22 2/9] mm: hugetlb: introduce a new config HUGETLB_PAGE_FREE_VMEMMAP Date: Fri, 30 Apr 2021 11:13:45 +0800 Message-Id: <20210430031352.45379-3-songmuchun@bytedance.com> X-Mailer: git-send-email 2.21.0 (Apple Git-122) In-Reply-To: <20210430031352.45379-1-songmuchun@bytedance.com> References: <20210430031352.45379-1-songmuchun@bytedance.com> MIME-Version: 1.0 X-Stat-Signature: tza9qa8ywpdcbtbxugjk7oupd7afzbpb X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 4DC96E000120 Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=mlyV38kw; spf=pass (imf13.hostedemail.com: domain of songmuchun@bytedance.com designates 209.85.215.175 as permitted sender) smtp.mailfrom=songmuchun@bytedance.com; dmarc=pass (policy=none) header.from=bytedance.com Received-SPF: none (bytedance.com>: No applicable sender policy available) receiver=imf13; identity=mailfrom; envelope-from="<songmuchun@bytedance.com>"; helo=mail-pg1-f175.google.com; client-ip=209.85.215.175 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1619752828-270474 Content-Transfer-Encoding: quoted-printable 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: <linux-mm.kvack.org> |
Series |
Free some vmemmap pages of HugeTLB page
|
expand
|
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 3aaf1d30c777..65ea58527176 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -1270,7 +1270,7 @@ static struct kcore_list kcore_vsyscall; static void __init register_page_bootmem_info(void) { -#ifdef CONFIG_NUMA +#if defined(CONFIG_NUMA) || defined(CONFIG_HUGETLB_PAGE_FREE_VMEMMAP) int i; for_each_online_node(i) diff --git a/fs/Kconfig b/fs/Kconfig index dcd9161fbeba..6ce6fdac00a3 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -240,6 +240,11 @@ config HUGETLBFS config HUGETLB_PAGE def_bool HUGETLBFS +config HUGETLB_PAGE_FREE_VMEMMAP + def_bool HUGETLB_PAGE + depends on X86_64 + depends on SPARSEMEM_VMEMMAP + config MEMFD_CREATE def_bool TMPFS || HUGETLBFS