From patchwork Fri May 20 02:55:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muchun Song X-Patchwork-Id: 12856242 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 89FFCC433EF for ; Fri, 20 May 2022 02:56:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F366D6B0071; Thu, 19 May 2022 22:56:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EBE486B0072; Thu, 19 May 2022 22:56:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D5EAF6B0073; Thu, 19 May 2022 22:56:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id C31726B0071 for ; Thu, 19 May 2022 22:56:30 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 8BBCB9FE for ; Fri, 20 May 2022 02:56:30 +0000 (UTC) X-FDA: 79484608140.06.8AAE545 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by imf08.hostedemail.com (Postfix) with ESMTP id 18A60160008 for ; Fri, 20 May 2022 02:56:09 +0000 (UTC) Received: by mail-pl1-f180.google.com with SMTP id q4so6293114plr.11 for ; Thu, 19 May 2022 19:56: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=arFWL10Ch1n8yhdI9Mk3g6bNs91IYU+HlkP+JS3nOtc=; b=wizXH2T4i0hpvyt1QyLKg8TJlFJ0pfc6am4wF+te/O3S9glO8olN0SHXNgf4XMOoeA vV2Wnl58mBKeekoB6US+vMjbV3r6LPQEj/7d2af5doeUV7LO3RAnChsoB+paO63F+lE3 gIPtQB8Ee/hMqlf28gB6G0/OTsSEN7FhLi5vHK0GQNb2sbI+CJfs5nHoUTlVCtnj/TYK Sk6i6HD1cC+PTtTSSAi94V29xLQ7WhlBol3au+V0pxZ3UHwyuy4gCQv6l6w5VW3jZVFl E8eSg2aW86VGC044TmzYkarO+G2YkcYUswMF/Gshk+GKcHuvJgULhv9XTs+YgMxXR6w6 3fBg== 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=arFWL10Ch1n8yhdI9Mk3g6bNs91IYU+HlkP+JS3nOtc=; b=K+hwGlLXrek7bdrHS3IKp/ZnfhxPNxFBfyMzWCtMllqRBnLSMvUT5nL7LPUL6NHYXg emu3t7YvXqwIOsWXI4yyd6Ox9H5NSnYoJbN1GK7z55f5avQe9Wwi2HuDDYu2X0l6mUd3 AoTvJQPjbsNDng6Ov1fsvzQnYnSd+hs3S2drHdmJFaiHKPJ1pscuhGmCrPXJatPZC/Lj 5BEuVhc+SXq13H/nY5NZduOfkI3k34RIur76FQfF4Mex3OSvovVLE6/Fzmhum8jl+DsA 7aEFHwTWSa+uibaNO0I/pRprUhuKRu6EOCNtSaZyZvC4VCz9gqNumMpq96vhaoB7ywgu L85Q== X-Gm-Message-State: AOAM531JkLgEa8ShcZX6eby4bfI5z9wnGGGlJ5ZSwizTv23OVdCYAnxb 8ac9nK4pdTAbOHXqpnBIme7TLg== X-Google-Smtp-Source: ABdhPJzmfzbWN5y+2+2LQpGTfqGvPCPq3Ax+cTXuRcr74nqsBxj1mht756PZTm11HL7tsYT9gkMvYw== X-Received: by 2002:a17:90b:4d0c:b0:1df:c9a6:84d8 with SMTP id mw12-20020a17090b4d0c00b001dfc9a684d8mr8900143pjb.231.1653015386971; Thu, 19 May 2022 19:56:26 -0700 (PDT) Received: from FVFYT0MHHV2J.bytedance.net ([139.177.225.234]) by smtp.gmail.com with ESMTPSA id o10-20020a62f90a000000b0050dc76281a5sm225675pfh.127.2022.05.19.19.56.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 May 2022 19:56:26 -0700 (PDT) From: Muchun Song To: corbet@lwn.net, akpm@linux-foundation.org, paulmck@kernel.org, mike.kravetz@oracle.com, osalvador@suse.de, david@redhat.com Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, duanxiongchun@bytedance.com, smuchun@gmail.com, Muchun Song Subject: [PATCH v2 0/2] make hugetlb_optimize_vmemmap compatible with memmap_on_memory Date: Fri, 20 May 2022 10:55:36 +0800 Message-Id: <20220520025538.21144-1-songmuchun@bytedance.com> X-Mailer: git-send-email 2.32.1 (Apple Git-133) MIME-Version: 1.0 X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 18A60160008 X-Stat-Signature: gom7zmdunyuus9szcq4o4m84rixwry3n X-Rspam-User: Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=wizXH2T4; spf=pass (imf08.hostedemail.com: domain of songmuchun@bytedance.com designates 209.85.214.180 as permitted sender) smtp.mailfrom=songmuchun@bytedance.com; dmarc=pass (policy=none) header.from=bytedance.com X-HE-Tag: 1653015369-686791 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 makes hugetlb_optimize_vmemmap compatible with memmap_on_memory and is based on next-20220518. The reason refers to the patch 2's commit log. v2: - Fix compile error when !CONFIG_ZONE_DEVICE reported by kernel test robot. Muchun Song (2): mm: memory_hotplug: enumerate all supported section flags mm: memory_hotplug: introduce SECTION_CANNOT_OPTIMIZE_VMEMMAP Documentation/admin-guide/kernel-parameters.txt | 22 ++++---- Documentation/admin-guide/sysctl/vm.rst | 5 +- include/linux/kconfig.h | 1 + include/linux/memory_hotplug.h | 9 ---- include/linux/mmzone.h | 71 ++++++++++++++++++++++--- mm/hugetlb_vmemmap.c | 28 +++++++--- mm/memory_hotplug.c | 28 +++++----- mm/sparse.c | 8 +++ 8 files changed, 119 insertions(+), 53 deletions(-)