From patchwork Mon Apr 4 07:46:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muchun Song X-Patchwork-Id: 12799960 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 624D4C433F5 for ; Mon, 4 Apr 2022 07:47:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B7CEC6B0072; Mon, 4 Apr 2022 03:47:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B2D2B6B0073; Mon, 4 Apr 2022 03:47:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9CDA36B0074; Mon, 4 Apr 2022 03:47:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 8B0936B0072 for ; Mon, 4 Apr 2022 03:47:30 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id 53B3E81651 for ; Mon, 4 Apr 2022 07:47:20 +0000 (UTC) X-FDA: 79318416240.14.D25E204 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by imf15.hostedemail.com (Postfix) with ESMTP id 3067AA000B for ; Mon, 4 Apr 2022 07:47:18 +0000 (UTC) Received: by mail-pl1-f170.google.com with SMTP id n8so476447plh.1 for ; Mon, 04 Apr 2022 00:47:18 -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=0eeT6kPw0yLPrANsQAxwIxRSWeGtxpHd9u+X7Wv3pGE=; b=Y+9H/px8pBLuWwNc5mNdxkF+MHWQsFi8MXFzKzIQ3IphDkradk32peIA372HJM9sRd 9/XBzNydfRNBjL5g9VPofLauSg2M2l4JUCRcYRwPZS2JRyjTa6a8AlAZJ5lm2xRbPnEy x3iwBrrBPNLSPWiYGWPsmYyohRHk/1gYItdb0su6o/MLCgVnVv54ScrZxgrW1YzinsoT lVyrD0Z+gis08MqKFLrepPq98OAR08Q0iPrJR5DRlObxKLoKQg5gVsksn/Ja32+TAGE7 NMCB8aWB91vGlYUr1mDCyxwcE9b6UIE2xfIGl7lHxhN1FRWNztQM83ZI4UJY9ifWwzck v2VA== 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=0eeT6kPw0yLPrANsQAxwIxRSWeGtxpHd9u+X7Wv3pGE=; b=T1OpLL+VM1CIp2pGTjMpiYBbvaQjLsMzhWnOyRAu6YZLJ7U/TNQ55A44Dm/ui5s3AV GX/apchStRHfIDTUZYWzX2A0g3uVWWxZBpLBjPAN8j/v/J2tuj4XCqnJ0mNq/l/kCoax cCgMrqi8A2S0ggllOhruJ+mRs4KH3RXZ1lu/Smc2KvrppkSxhWRz1zP9pkuPNHNfPnsr xXvr/hPpv4Ci4g3dxpSK2Cslyr77w09mKKNewW6ZJivOW7jA0TE6pVATpHB1rLRD+ARE l3F/S2kmPRa9uI+B6PZTlgEi1wxcWmX0OLfnHBPavQNyDHjRmSWAMQlQ/ufjla7vFbvu 1RNw== X-Gm-Message-State: AOAM532gI9TnrSUk4ZQ6BfZWPrn+gP5DXw9ZXcnJ+pEyfnY1ox9dLsat NEO9bXqGUK65FgZ0Uf1cJ092CQ== X-Google-Smtp-Source: ABdhPJzRe/n6k0xdw97giJs6QEXkVJSOZ+CF0WqVP2yuW58cDTjgrcK3nXt32NvZ4ILaeG4XXrjPog== X-Received: by 2002:a17:902:e193:b0:156:a04a:40d0 with SMTP id y19-20020a170902e19300b00156a04a40d0mr4453833pla.125.1649058437835; Mon, 04 Apr 2022 00:47:17 -0700 (PDT) Received: from FVFYT0MHHV2J.bytedance.net ([139.177.225.245]) by smtp.gmail.com with ESMTPSA id g70-20020a636b49000000b003823dd39d41sm9376579pgc.64.2022.04.04.00.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 00:47:17 -0700 (PDT) From: Muchun Song To: mike.kravetz@oracle.com, akpm@linux-foundation.org, david@redhat.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, smuchun@bytedance.com, Muchun Song Subject: [PATCH 0/3] cleanup hugetlb_vmemmap Date: Mon, 4 Apr 2022 15:46:49 +0800 Message-Id: <20220404074652.68024-1-songmuchun@bytedance.com> X-Mailer: git-send-email 2.32.0 (Apple Git-132) MIME-Version: 1.0 X-Stat-Signature: yiyui1sm56twjbczwbo7n3ojpw9cw3sa Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b="Y+9H/px8"; spf=pass (imf15.hostedemail.com: domain of songmuchun@bytedance.com designates 209.85.214.170 as permitted sender) smtp.mailfrom=songmuchun@bytedance.com; dmarc=pass (policy=none) header.from=bytedance.com X-Rspam-User: X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 3067AA000B X-HE-Tag: 1649058438-871569 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 is based on next-20220404. The word of "free" is not expressive enough to express the feature of optimizing vmemmap pages associated with each HugeTLB, rename this keywork to "optimeze" is more clear. In this series, cheanup related codes to make it more clear and expressive. This is suggested by David. Muchun Song (3): mm: hugetlb_vmemmap: cleanup hugetlb_vmemmap related functions mm: hugetlb_vmemmap: cleanup hugetlb_free_vmemmap_enabled* mm: hugetlb_vmemmap: cleanup CONFIG_HUGETLB_PAGE_FREE_VMEMMAP* Documentation/admin-guide/kernel-parameters.txt | 4 +- Documentation/admin-guide/mm/hugetlbpage.rst | 2 +- arch/arm64/Kconfig | 2 +- arch/arm64/mm/flush.c | 4 +- arch/x86/Kconfig | 2 +- arch/x86/mm/init_64.c | 2 +- fs/Kconfig | 16 +++---- include/linux/hugetlb.h | 4 +- include/linux/mm.h | 2 +- include/linux/page-flags.h | 18 ++++---- mm/Makefile | 2 +- mm/hugetlb.c | 10 ++--- mm/hugetlb_vmemmap.c | 56 ++++++++++++------------- mm/hugetlb_vmemmap.h | 24 +++++------ mm/memory_hotplug.c | 2 +- mm/sparse-vmemmap.c | 4 +- 16 files changed, 76 insertions(+), 78 deletions(-)