From patchwork Fri Jun 17 13:56:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muchun Song X-Patchwork-Id: 12885724 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 532AEC433EF for ; Fri, 17 Jun 2022 13:58:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B82626B0074; Fri, 17 Jun 2022 09:58:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B31D66B0075; Fri, 17 Jun 2022 09:58:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9D3336B0078; Fri, 17 Jun 2022 09:58:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 8ACFD6B0074 for ; Fri, 17 Jun 2022 09:58:11 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 5279760186 for ; Fri, 17 Jun 2022 13:58:11 +0000 (UTC) X-FDA: 79587881982.29.7626CC9 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by imf30.hostedemail.com (Postfix) with ESMTP id 4224E80090 for ; Fri, 17 Jun 2022 13:58:08 +0000 (UTC) Received: by mail-pl1-f173.google.com with SMTP id m14so3957182plg.5 for ; Fri, 17 Jun 2022 06:58:07 -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=R3PCuIcYAcZyb+k4ENIbfzjTIn3XM8zfk9TCfHX0dmA=; b=EWCtootqlRe6RzPmBcX/GvZIDoYDBFHPKC5RtYBkHp4WG27bDvGfe8Vb3qaWqpOIxu X9cpHH/lpp6xBmJoXDKQp+QTVXQ83H5faWsQksdRKoyIu24ml5tBs6fYuUyoeBYGJx1B bzyrTklsyt/4hngqwLTTfcNQinZlBWyAl9GHG1Ya0r0X7fNcwboZs91b32JcVi/GDfJa f/20BsC0euG+39EZLQgh+t0kViZC14EUAtd63YPMhQkpOuY7DOHHOJ3bqsX6a75lG9bT R8mJFQc6/EUiX8ZL2S+F45kcOEpLZBPhembrWLM/edIQ3fijtGT4Zv8Ote0Ky2ShrPtn Nlhg== 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=R3PCuIcYAcZyb+k4ENIbfzjTIn3XM8zfk9TCfHX0dmA=; b=IQkAq3+q3+HgkQ3rlRXhiALGG5O6sIVhvf31WlGCUmH7enTUMS7JtZ75MEYnr+/jnI dYZmm8+20rbhrCm0o8kWa8I7t03YETeLKOjZ84p//Sg3kDxcZkeOyQVBV05jeaIcujkB nQZkGtaD8bmyHLO4s2lr1oywXsP2sWP8eoZ1wgS9vcCxb5fLENkywt0C4WmiIpQteqaZ 1r/T8q80zJDQ1Ne+gwCSy2HV2i/V8a+o59b58pfmxNy0gFXcXbXqp6kBf06IRtNL0hS5 BzrSr83laxSQ6Vip/Ukse29MejayUT28qA0s+XnqR4G8IKjWAZW9Lpr5699hs70LpdYj A+EQ== X-Gm-Message-State: AJIora+BqnZv9XSKH3PVc5Q+PaXndoWYrP2svkk69v/QlHxPPI4uxaLb 2gW9PHEZMCWniQXeopzVvC86hw== X-Google-Smtp-Source: AGRyM1u0E5+TFznm/6+22gBGLbXXne5g4/D4eqNgUB31mGswQgCMIRkIrFAmMJdL0nA2QSXkuN7Ynw== X-Received: by 2002:a17:90b:4b49:b0:1e6:8827:aaf1 with SMTP id mi9-20020a17090b4b4900b001e68827aaf1mr10740999pjb.154.1655474286821; Fri, 17 Jun 2022 06:58:06 -0700 (PDT) Received: from FVFYT0MHHV2J.bytedance.net ([139.177.225.255]) by smtp.gmail.com with ESMTPSA id e3-20020a170903240300b0015e8d4eb277sm3605869plo.193.2022.06.17.06.58.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jun 2022 06:58:05 -0700 (PDT) From: Muchun Song To: akpm@linux-foundation.org, corbet@lwn.net, david@redhat.com, mike.kravetz@oracle.com, osalvador@suse.de, paulmck@kernel.org 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 v3 0/2] make hugetlb_optimize_vmemmap compatible with memmap_on_memory Date: Fri, 17 Jun 2022 21:56:48 +0800 Message-Id: <20220617135650.74901-1-songmuchun@bytedance.com> X-Mailer: git-send-email 2.32.1 (Apple Git-133) MIME-Version: 1.0 ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=EWCtootq; dmarc=pass (policy=none) header.from=bytedance.com; spf=pass (imf30.hostedemail.com: domain of songmuchun@bytedance.com designates 209.85.214.173 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=1655474290; 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=R3PCuIcYAcZyb+k4ENIbfzjTIn3XM8zfk9TCfHX0dmA=; b=riU/yZRCAHynzcCUyEx2iiwFJnUNMJ27bOkPgyjreiOjvjBIsr1MfC1/mh+e5LezBy4T8f VaMKqtln9QDV7ghE4eJ3eFk83yvH3ruJdI4e+nmpMlYbOMRzZXlvnXXDw5iQnl5s/NnU6F AGHa5vjTE0L8TCyN+6XSlHso7eLOm0M= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655474291; a=rsa-sha256; cv=none; b=MmKmWNU3LbKwG5hxfLfw0Cr2/Rv0j4ZMt5zIPPJU/hzpAKGqrJFh1ZHNgFOz/7nnJilJIR ODp3AXb5VAkBiPSkOlxHwm0V8C9KY/EdofRAhrA6MtF/jkAyvhANTSdV9vfb7T2uGp3Bxp KJB7RdEQywu2lzgVtL8yG12Ifq12su0= X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 4224E80090 X-Rspam-User: Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=EWCtootq; dmarc=pass (policy=none) header.from=bytedance.com; spf=pass (imf30.hostedemail.com: domain of songmuchun@bytedance.com designates 209.85.214.173 as permitted sender) smtp.mailfrom=songmuchun@bytedance.com X-Stat-Signature: wm3ekjc7eyizejidcsyrjqd3synrdics X-HE-Tag: 1655474288-76564 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 mm-stable. The reason refers to the patch 2's commit log. v3: - Switch complicated enumeration magic (David). - Introduce PageVmemmapSelfHosted to make both parameters compatible (David and Oscar). 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: make hugetlb_optimize_vmemmap compatible with memmap_on_memory Documentation/admin-guide/kernel-parameters.txt | 22 ++++++------ Documentation/admin-guide/sysctl/vm.rst | 5 ++- include/linux/memory_hotplug.h | 9 ----- include/linux/mmzone.h | 44 ++++++++++++++++++----- include/linux/page-flags.h | 11 ++++++ mm/hugetlb_vmemmap.c | 47 ++++++++++++++++++++----- mm/memory_hotplug.c | 33 ++++++++--------- mm/sparse.c | 2 +- 8 files changed, 116 insertions(+), 57 deletions(-) base-commit: 6edda04ccc7cfb281d139e352dbd5dd933bd2751