Message ID | 20210415084005.25049-3-songmuchun@bytedance.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=L7mj=JM=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,URIBL_BLOCKED,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 AB33DC43460 for <linux-mm@archiver.kernel.org>; Thu, 15 Apr 2021 08:42:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2B3F9611C0 for <linux-mm@archiver.kernel.org>; Thu, 15 Apr 2021 08:42:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B3F9611C0 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 BB0EE6B0071; Thu, 15 Apr 2021 04:42:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B60796B0072; Thu, 15 Apr 2021 04:42:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9B4846B0073; Thu, 15 Apr 2021 04:42:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0230.hostedemail.com [216.40.44.230]) by kanga.kvack.org (Postfix) with ESMTP id 80A866B0071 for <linux-mm@kvack.org>; Thu, 15 Apr 2021 04:42:42 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 3BDA15DF9 for <linux-mm@kvack.org>; Thu, 15 Apr 2021 08:42:42 +0000 (UTC) X-FDA: 78033960564.10.D5E0CC0 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by imf08.hostedemail.com (Postfix) with ESMTP id B177D80192E5 for <linux-mm@kvack.org>; Thu, 15 Apr 2021 08:42:27 +0000 (UTC) Received: by mail-pl1-f179.google.com with SMTP id j7so11668996plx.2 for <linux-mm@kvack.org>; Thu, 15 Apr 2021 01:42:41 -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=qb4x4kPnL1dlpXI/+d0gpkF9kwYzBftXjo9PWqIU+lemjVOupYoguZKtb3/kCWI/mA T9JH4OZFrCtydpvncc4zCUgGk6vtkX7DUfps28LPiF2CQjU+dSmQ8bBSEpkKk4ne6rhK 6yf9mefEVL7Mj17r33WvTPAvFZkVKDKuPHKB7BuJNleKt/82bfR+1hwlKwec4Ts2CFNY MnQNsL1wYBWXbPnU5p6kkIspVCmbqqzPWvgQXKAAh6qG2D5iOdz+Lx0iyqlBrHuetu1t OrInlgTR0i7KbWcXGiSWYs82WBbE93RYJV+Jgh4OIIg1mbtCwYiQyK7MckgrwHKEdUoe Df5w== 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=k39sAmFzU9YOJ9eXMtR9oIEL41etnjRCCsp/JYIDGHRCkSwbAk1jKmnMXDKpP8Xlj9 +Zr8bw2l8OAnhqhWL6fVCIfGcvBa92CEjaDzoV6S7BzZ9p8ju2nKGwaKNifDfmmje879 O/e/5u3TZOjKCeo2gR905RDeadIm6zI7rfMAf8ZEDPTmLsIdB5QA9veQK2fIPYwMgsdh VuiX+A9ax9hdMKHKNGU5hccqOTZxRt1BZYeMjK4Tk2bHE/8kg7tqIobNs2O2IVaenw73 uTe/nXEmnUECHyc87ViRmJFcPzl5/5lhUciVIysKcAjMsftTbmgdq/zp+N0YsNJavGwn pMCA== X-Gm-Message-State: AOAM532SpGmjwCWyoNVnVQgt7dLLYvtvH/6XILPnxONbq/L6EHq7H4Ig 1pcYO0vcYNzUfE5PI9SThqUPzA== X-Google-Smtp-Source: ABdhPJyzbv6Qvy5O0BwCVmcna9pkNkXi+jWZJy9ZJO77vt43H2p7otmlQGPUwJTF2JUh3+JZ9iTBOQ== X-Received: by 2002:a17:90a:6be2:: with SMTP id w89mr2653717pjj.130.1618476160886; Thu, 15 Apr 2021 01:42:40 -0700 (PDT) Received: from localhost.localdomain ([139.177.225.234]) by smtp.gmail.com with ESMTPSA id e13sm1392365pgt.91.2021.04.15.01.42.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Apr 2021 01:42:40 -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, 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 v20 2/9] mm: hugetlb: introduce a new config HUGETLB_PAGE_FREE_VMEMMAP Date: Thu, 15 Apr 2021 16:39:58 +0800 Message-Id: <20210415084005.25049-3-songmuchun@bytedance.com> X-Mailer: git-send-email 2.21.0 (Apple Git-122) In-Reply-To: <20210415084005.25049-1-songmuchun@bytedance.com> References: <20210415084005.25049-1-songmuchun@bytedance.com> MIME-Version: 1.0 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: B177D80192E5 X-Stat-Signature: oitrj97jjs7qfdn4df7w5fr8kdmqkxuh Received-SPF: none (bytedance.com>: No applicable sender policy available) receiver=imf08; identity=mailfrom; envelope-from="<songmuchun@bytedance.com>"; helo=mail-pl1-f179.google.com; client-ip=209.85.214.179 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1618476147-668247 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