From patchwork Mon Jun 13 06:35:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muchun Song X-Patchwork-Id: 12879050 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 9B172C43334 for ; Mon, 13 Jun 2022 06:35:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B719E8D0157; Mon, 13 Jun 2022 02:35:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B1F358D0142; Mon, 13 Jun 2022 02:35:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9E76F8D0157; Mon, 13 Jun 2022 02:35:29 -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 882FA8D0142 for ; Mon, 13 Jun 2022 02:35:29 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 4F07E20E02 for ; Mon, 13 Jun 2022 06:35:29 +0000 (UTC) X-FDA: 79572251178.09.CA31166 Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by imf12.hostedemail.com (Postfix) with ESMTP id 85C5940090 for ; Mon, 13 Jun 2022 06:35:28 +0000 (UTC) Received: by mail-pf1-f182.google.com with SMTP id x4so4909332pfj.10 for ; Sun, 12 Jun 2022 23:35:28 -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=Ejoz2DCbggYc1zBmQNGGZRqPtrQj0ureLICOuzJFZmU=; b=OxTUnNdHpp50SMsYqQOIYKSwtagFzLBUmMmPY9dFZ+mCEDI0GK+/N644JE0MVvRWuD oi1jkSH30j46ZX061wTIpMoKjsckKkkuG/UTdIMbtVUUrwrWj6v0vGxlZ5xKHU3UMk9T MrG7FrNRnF7cqn36SdxWn026hu4EX/7nFvs5WuiE7CM50W17zGVGpz84tR9HpKEl3rAP ebelIoFS5Lhto5GBs76E3lrxeLiAqiWUJpaQk8EmX7YkGPsQrbcXln9b+NRDLz4b96yY iO0CKZxjNJq7XR6NnOJoSyQDAR3SBeko1QHhxk3M5dWxw7EsjElP96SoYkXgUEZRLgbb 1vjg== 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=Ejoz2DCbggYc1zBmQNGGZRqPtrQj0ureLICOuzJFZmU=; b=sdOfAdVr6vU/juIiAJwDLYnZfMa+eQLo1JenWvEN+Mo8SlRVFH3uJzGNmiXSTAcbZ6 1T0nt9Xe0wz3cCxZkwIy0XsyE3k8iVy+4pboUyLkdZ4h+eCwHf3AbW8bmNLiXskyn+dt iwsyqIA7iTpL49u/y8xw03X2SJ4oVu7zaS4vcCd9DIVY5prHsV1gE2STpe3l2WMuJGb7 P88lvlEWVFlLQapGvYuad9CyK8TQXbnHsUZuO/Oi+JDagDkguWWdlgrBzpMJFBCFhNIC 9Yt2nAsdMrHiZSi2euFZwTfBaMIvQT0M7k7NHSeP6PF4jXNR55TvLGIB/VhkLW/b9wNj PidQ== X-Gm-Message-State: AOAM5326MsZsI5U4XiKY+Y6/kctl/UO5/VLvw+VRVmVcan8IDFHbUyrc UgZtv9rnwn68O7sWENwwz1oJRw== X-Google-Smtp-Source: ABdhPJymj2CTUZcvnfpi7YZkMigHH98usV2DwWdiEfXKQZqUz6w1sAVIilmQqx44Ffhe7JQCx6y0YA== X-Received: by 2002:a63:5723:0:b0:3fd:d8b4:c19f with SMTP id l35-20020a635723000000b003fdd8b4c19fmr31492536pgb.137.1655102127199; Sun, 12 Jun 2022 23:35:27 -0700 (PDT) Received: from FVFYT0MHHV2J.bytedance.net ([139.177.225.255]) by smtp.gmail.com with ESMTPSA id v3-20020aa799c3000000b0051bc538baadsm4366554pfi.184.2022.06.12.23.35.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jun 2022 23:35:26 -0700 (PDT) From: Muchun Song To: mike.kravetz@oracle.com, david@redhat.com, akpm@linux-foundation.org, corbet@lwn.net Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Muchun Song Subject: [PATCH 0/6] Simplify hugetlb vmemmap and improve its readability Date: Mon, 13 Jun 2022 14:35:06 +0800 Message-Id: <20220613063512.17540-1-songmuchun@bytedance.com> X-Mailer: git-send-email 2.32.1 (Apple Git-133) MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655102129; a=rsa-sha256; cv=none; b=h91DqurlmiK+D6oe21kXts6kK3MFZhYxgi0QTgF/JwmuiHoRCY8N+OQAvbOiiZ8Ve+VhD0 WsIxYhon04VQb00LVEqLt6Wb4ttgGmGmaAbDcmOcCa0sZao6Yype2E0qYykg3EmSO28aCO 7lAQVuilnA0PduTbw6fhaXyPKfVuStg= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=OxTUnNdH; dmarc=pass (policy=none) header.from=bytedance.com; spf=pass (imf12.hostedemail.com: domain of songmuchun@bytedance.com designates 209.85.210.182 as permitted sender) smtp.mailfrom=songmuchun@bytedance.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655102129; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=Ejoz2DCbggYc1zBmQNGGZRqPtrQj0ureLICOuzJFZmU=; b=kG+nJoSofCYAZzECXOZ63pFKPW0FByZ7vGzHwOYlE4ZuzOG9h58r80FXw2iZa8w0uMLfUp HOuvNJBhjkKvEQHHq4w2yT4Ey+XcphTHwuO7Q5nS8Kt9PgqhseJTjdUaezCcipiQfw+fzL yvobJMt+hnGiUPduzWYCiSa2jQoZtHc= X-Stat-Signature: e1o95zaawoegz1hr96hm4i8cepymdhqh X-Rspamd-Queue-Id: 85C5940090 X-Rspam-User: X-Rspamd-Server: rspam10 Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=OxTUnNdH; dmarc=pass (policy=none) header.from=bytedance.com; spf=pass (imf12.hostedemail.com: domain of songmuchun@bytedance.com designates 209.85.210.182 as permitted sender) smtp.mailfrom=songmuchun@bytedance.com X-HE-Tag: 1655102128-876077 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: This series aims to simplify hugetlb vmemmap and improve its readability and is based on next-20220610. Muchun Song (6): mm: hugetlb_vmemmap: delete hugetlb_optimize_vmemmap_enabled() mm: hugetlb_vmemmap: optimize vmemmap_optimize_mode handling mm: hugetlb_vmemmap: introduce the name HVO mm: hugetlb_vmemmap: move vmemmap code related to HugeTLB to hugetlb_vmemmap.c mm: hugetlb_vmemmap: replace early_param() with core_param() mm: hugetlb_vmemmap: improve hugetlb_vmemmap code readability Documentation/admin-guide/kernel-parameters.txt | 7 +- Documentation/admin-guide/mm/hugetlbpage.rst | 3 +- Documentation/admin-guide/sysctl/vm.rst | 3 +- arch/arm64/mm/flush.c | 13 +- fs/Kconfig | 13 +- include/linux/hugetlb.h | 7 +- include/linux/mm.h | 7 - include/linux/page-flags.h | 16 +- mm/hugetlb.c | 11 +- mm/hugetlb_vmemmap.c | 592 ++++++++++++++++++------ mm/hugetlb_vmemmap.h | 43 +- mm/sparse-vmemmap.c | 391 ---------------- 12 files changed, 509 insertions(+), 597 deletions(-) base-commit: 6d0c806803170f120f8cb97b321de7bd89d3a791