Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2219936/?format=api
{ "id": 2219936, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2219936/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260405125240.2558577-12-songmuchun@bytedance.com/", "project": { "id": 2, "url": "http://patchwork.ozlabs.org/api/1.2/projects/2/?format=api", "name": "Linux PPC development", "link_name": "linuxppc-dev", "list_id": "linuxppc-dev.lists.ozlabs.org", "list_email": "linuxppc-dev@lists.ozlabs.org", "web_url": "https://github.com/linuxppc/wiki/wiki", "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git", "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/", "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/", "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}" }, "msgid": "<20260405125240.2558577-12-songmuchun@bytedance.com>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20260405125240.2558577-12-songmuchun@bytedance.com/", "date": "2026-04-05T12:52:02", "name": "[11/49] mm: defer sparse_init() until after zone initialization", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "af4deb9b9ed905b44a62380918849b1c5de438f4", "submitter": { "id": 78930, "url": "http://patchwork.ozlabs.org/api/1.2/people/78930/?format=api", "name": "Muchun Song", "email": "songmuchun@bytedance.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260405125240.2558577-12-songmuchun@bytedance.com/mbox/", "series": [ { "id": 498783, "url": "http://patchwork.ozlabs.org/api/1.2/series/498783/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=498783", "date": "2026-04-05T12:51:51", "name": "mm: Generalize vmemmap optimization for DAX and HugeTLB", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/498783/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2219936/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2219936/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linuxppc-dev+bounces-19341-incoming=patchwork.ozlabs.org@lists.ozlabs.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linuxppc-dev@lists.ozlabs.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=bytedance.com header.i=@bytedance.com\n header.a=rsa-sha256 header.s=google header.b=ifMLwWJW;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=2404:9400:21b9:f100::1; helo=lists.ozlabs.org;\n envelope-from=linuxppc-dev+bounces-19341-incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)", "lists.ozlabs.org;\n arc=none smtp.remote-ip=\"2607:f8b0:4864:20::1035\"", "lists.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=bytedance.com", "lists.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=bytedance.com header.i=@bytedance.com\n header.a=rsa-sha256 header.s=google header.b=ifMLwWJW;\n\tdkim-atps=neutral", "lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=bytedance.com\n (client-ip=2607:f8b0:4864:20::1035; helo=mail-pj1-x1035.google.com;\n envelope-from=songmuchun@bytedance.com; receiver=lists.ozlabs.org)" ], "Received": [ "from lists.ozlabs.org (lists.ozlabs.org\n [IPv6:2404:9400:21b9:f100::1])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fpXVC5hfTz1yCs\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 05 Apr 2026 22:54:43 +1000 (AEST)", "from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4fpXV572mHz2yqW;\n\tSun, 05 Apr 2026 22:54:37 +1000 (AEST)", "from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com\n [IPv6:2607:f8b0:4864:20::1035])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 4fpXV51F7tz2ypw\n\tfor <linuxppc-dev@lists.ozlabs.org>; Sun, 05 Apr 2026 22:54:37 +1000 (AEST)", "by mail-pj1-x1035.google.com with SMTP id\n 98e67ed59e1d1-35d95017a68so1680826a91.3\n for <linuxppc-dev@lists.ozlabs.org>;\n Sun, 05 Apr 2026 05:54:37 -0700 (PDT)", "from n232-176-004.byted.org ([36.110.163.97])\n by smtp.gmail.com with ESMTPSA id\n 98e67ed59e1d1-35de66b4808sm3748505a91.2.2026.04.05.05.54.28\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sun, 05 Apr 2026 05:54:34 -0700 (PDT)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1775393677;\n\tcv=none;\n b=ir5GsCrWMgearSwSytF8DBjSEoXaRQPfm/WKbaIoHszOPGV8EacTSaEbbuAtB1O5i+eVhdCb8Ir/q9Qqe9w9EH4+Lmdi4QGnc4sApuxb9Ymoh9uCdJT2v4Kwa5bHSMuKdIvbrgoaNftWNCZilxnqXhhV5ApUB7eQgCW/azzBCJvYxPXQRh70IQWGz/caxS/qo+mzd/t4ofne8xiITqpM2mtrBsIzKdxGNISGSNbyIRqBnt/eMswO0TEbk0DSQdP7/aTHITqJSSY40N93f8OtbpiHhXY8ZNgiKcMNJ5aNOM2Vlbaa0FDiHluotccvUtG+gdO2eGTEF7baGtaE0aAm3w==", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1775393677; c=relaxed/relaxed;\n\tbh=kuz46CNuL6O0+N77LBKvrgQNIe8WIqaWxa3OjXOrUz0=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t MIME-Version;\n b=VuAx8x+W6SUeZNji+6oE0/LAq1b8jqdSRSURCXFb77edz0SspGPGc3zF38+UtPz05Y+SJDy82yCXzixC5EZ0iGUfIqqxyAVLV91c/Ypjth2j66NeY/ryaNoxheHl/vyzpq6fJghjiQ+4ewLL+mA092VB4bECSZyIczDTFlL+iko6i+l/jvYzPw3w9lVujTK5yI75zxZNOMdN+DW9PfYUNThjYbVQs/UhA5vQVTBr7D2nrd1pcUl+a5AH3ASQAaeeQh6626ZUCceOfdqkvNAR+zra5PfiKREV9PcC4Q+OLPx1kSh1NyXsPxG67hqNSmsdFC8jBf+VNy5hhBe4K4DU4A==", "ARC-Authentication-Results": "i=1; lists.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=bytedance.com;\n dkim=pass (2048-bit key;\n unprotected) header.d=bytedance.com header.i=@bytedance.com\n header.a=rsa-sha256 header.s=google header.b=ifMLwWJW; dkim-atps=neutral;\n spf=pass (client-ip=2607:f8b0:4864:20::1035; helo=mail-pj1-x1035.google.com;\n envelope-from=songmuchun@bytedance.com;\n receiver=lists.ozlabs.org) smtp.mailfrom=bytedance.com", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=bytedance.com; s=google; t=1775393675; x=1775998475;\n darn=lists.ozlabs.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=kuz46CNuL6O0+N77LBKvrgQNIe8WIqaWxa3OjXOrUz0=;\n b=ifMLwWJWGw68ZdIdriJh9l/EpbK32ZiyRhqHyjbTltktw6raaQtqSO6am/ZwUzIzWv\n NnJO4P1eKoefhJATbU6wlkJeX5xFxoVUyS1x69BeVbevvepjuu2EcwR4jgGTN/ewMKd7\n 8c93bbwGFtmAVciULsNLCJm9JNbDN09nlpGB2rQ7PGgyyRSwcmE2DW58gJlaS+sKDmZG\n CeMwF3LSaL3Q4DFqagcCq4w8jydpu/LZYrSIDyDkWBUL6+p2VMfopc81Ba+FrSkZUk2k\n A/UG787Q0eR06aHIhUHb7Iu1oaRZTv41j2x4svjg+mgj6ZC5IhBFLvaxbM3Si11Dy+4f\n 56xQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775393675; x=1775998475;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=kuz46CNuL6O0+N77LBKvrgQNIe8WIqaWxa3OjXOrUz0=;\n b=B0MUedczzd9aR8XUpEJocHcr5e7LdM/FfH7PVnbxHqtyT+XX97XYHCr6knNPcgssQ7\n b0ICzjabZWtvI3RgDzTPqqGK/euXaVfq95X9D+E2SOMtShAejcQNZeDy0GYFOD+lAm/O\n vNgEAJush+sNIQAFI3uKHJBOQ4OoTSZkvoNntOiDeAJpKB4I72dhEM025WwMwGAfQF7V\n iURlSper1voLFfPeieow3usPXgWLSCs090dtd8awYt8VpYiB0ajTi9pfFh4by4fpm8A3\n vQYnAag73Urew0SOV7+BlueGlO99U+/s2/zNg/KYQURgRlsoO7MUX6KL9HwKKh/4+krL\n W6wA==", "X-Forwarded-Encrypted": "i=1;\n AJvYcCWmQ7BiqG8lHozX7SroIoRj0/GXHwpwFmUvaegVl8VcOeCtYPpkW3NYLu+ZKUEA/phL84NLwmkxtcBHk5Q=@lists.ozlabs.org", "X-Gm-Message-State": "AOJu0YxtFkMmfQS41uxz15Rr6n7hwlXyUzc60sqRW1qvyR3XUTgwGR49\n\tL+ZZu3KvO9psjz8dqt9eE3/kACTaEtXgh1p3j/qsNPNmkU1MRqdsg+Tes8AtaJcP2SI=", "X-Gm-Gg": "AeBDietW2W1otNRVqK2wLFcJ8+YqRKp0yemNZTuSYbfXa0gs1YyoWqrJuXw+xnvFaOD\n\txCq0qZPwQYywjzT/3ZKO+jBVLpjBENnmfHoVJjcpHpgtETm1NGv3NwD3f8yrhEwny51R4IabD4V\n\tbNpur5YZCl/3p0/qN12JZjF73iu5oDyT4xc+E4b709jeCvmY+XNFm52wwvW/NHLGOqfq+aNfQhr\n\tobByQQKhZaIsZBtqLiImoeK7h3vtKmOxei4vKyJzlOJL6/hS2avvKTQqx0rqqNwoG65ono0dCQL\n\tgwimL5VjYRUaqGiw3F17UYX4o4EuxKRsrdn4eH3rCAocGXPmPdPT/FrXSER4fHmvXHqK3mYWdQV\n\t+IRv7ghslrwIutRF91x6Mz8Bv8VyvVRsMuSwfa5V5LH53dfdI8fqUI8+PyjDveXLnhqu2U2IMMV\n\tMSnREBJm4dOyh3tNYDvvxSuGRmDX1io4YAfy0l80/mqvs=", "X-Received": "by 2002:a17:90b:48d0:b0:35c:a8f:5c5f with SMTP id\n 98e67ed59e1d1-35de68655bdmr8575177a91.8.1775393675104;\n Sun, 05 Apr 2026 05:54:35 -0700 (PDT)", "From": "Muchun Song <songmuchun@bytedance.com>", "To": "Andrew Morton <akpm@linux-foundation.org>,\n\tDavid Hildenbrand <david@kernel.org>,\n\tMuchun Song <muchun.song@linux.dev>,\n\tOscar Salvador <osalvador@suse.de>,\n\tMichael Ellerman <mpe@ellerman.id.au>,\n\tMadhavan Srinivasan <maddy@linux.ibm.com>", "Cc": "Lorenzo Stoakes <ljs@kernel.org>,\n\t\"Liam R . Howlett\" <Liam.Howlett@oracle.com>,\n\tVlastimil Babka <vbabka@kernel.org>,\n\tMike Rapoport <rppt@kernel.org>,\n\tSuren Baghdasaryan <surenb@google.com>,\n\tMichal Hocko <mhocko@suse.com>,\n\tNicholas Piggin <npiggin@gmail.com>,\n\tChristophe Leroy <chleroy@kernel.org>,\n\taneesh.kumar@linux.ibm.com,\n\tjoao.m.martins@oracle.com,\n\tlinux-mm@kvack.org,\n\tlinuxppc-dev@lists.ozlabs.org,\n\tlinux-kernel@vger.kernel.org,\n\tMuchun Song <songmuchun@bytedance.com>", "Subject": "[PATCH 11/49] mm: defer sparse_init() until after zone initialization", "Date": "Sun, 5 Apr 2026 20:52:02 +0800", "Message-Id": "<20260405125240.2558577-12-songmuchun@bytedance.com>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20260405125240.2558577-1-songmuchun@bytedance.com>", "References": "<20260405125240.2558577-1-songmuchun@bytedance.com>", "X-Mailing-List": "linuxppc-dev@lists.ozlabs.org", "List-Id": "<linuxppc-dev.lists.ozlabs.org>", "List-Help": "<mailto:linuxppc-dev+help@lists.ozlabs.org>", "List-Owner": "<mailto:linuxppc-dev+owner@lists.ozlabs.org>", "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>", "List-Archive": "<https://lore.kernel.org/linuxppc-dev/>,\n <https://lists.ozlabs.org/pipermail/linuxppc-dev/>", "List-Subscribe": "<mailto:linuxppc-dev+subscribe@lists.ozlabs.org>,\n <mailto:linuxppc-dev+subscribe-digest@lists.ozlabs.org>,\n <mailto:linuxppc-dev+subscribe-nomail@lists.ozlabs.org>", "List-Unsubscribe": "<mailto:linuxppc-dev+unsubscribe@lists.ozlabs.org>", "Precedence": "list", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Spam-Status": "No, score=-0.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tDKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS\n\tautolearn=disabled version=4.0.1 OzLabs 8", "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on lists.ozlabs.org" }, "content": "According to the comment of free_area_init(), its main goal is to\ninitialise all pg_data_t and zone data. However, sparse_init() and\nmemmap_init() are aimed at allocating vmemmap pages and initializing\nstruct page respectively, which differs from the goal of free_area_init().\nTherefore, it is reasonable to move them out of free_area_init().\n\nCall sparse_init() after free_area_init() to guarantee that zone data\nstructures are available when sparse_init() executes. This change is a\nprerequisite for integrating vmemmap initialization steps and allows\nsparse_init() to safely access zone information if needed (e.g. HVO case).\n\nAlso, move hugetlb reservation functions (hugetlb_cma_reserve() and\nhugetlb_bootmem_alloc()) to be after free_area_init(). This allows\nhugetlb reservation to access zone information to ensure that contiguous\npages are not allocated across zone boundaries, which simplifies the\nhugetlb code. So this is a preparation for subsequent changes.\n\nSigned-off-by: Muchun Song <songmuchun@bytedance.com>\n---\n mm/mm_init.c | 15 ++++++++-------\n mm/sparse.c | 3 ---\n 2 files changed, 8 insertions(+), 10 deletions(-)", "diff": "diff --git a/mm/mm_init.c b/mm/mm_init.c\nindex 5ca4503e7622..72604d02a853 100644\n--- a/mm/mm_init.c\n+++ b/mm/mm_init.c\n@@ -1807,7 +1807,6 @@ static void __init free_area_init(void)\n \tbool descending;\n \n \tarch_zone_limits_init(max_zone_pfn);\n-\tsparse_init();\n \n \tstart_pfn = PHYS_PFN(memblock_start_of_DRAM());\n \tdescending = arch_has_descending_max_zone_pfns();\n@@ -1896,11 +1895,7 @@ static void __init free_area_init(void)\n \t\t}\n \t}\n \n-\tfor_each_node_state(nid, N_MEMORY)\n-\t\tsparse_vmemmap_init_nid_late(nid);\n-\n \tcalc_nr_kernel_pages();\n-\tmemmap_init();\n \n \t/* disable hash distribution for systems with a single node */\n \tfixup_hashdist();\n@@ -2669,10 +2664,16 @@ void __init __weak mem_init(void)\n \n void __init mm_core_init_early(void)\n {\n-\thugetlb_cma_reserve();\n-\thugetlb_bootmem_alloc();\n+\tint nid;\n \n \tfree_area_init();\n+\t/* Zone data structures are available from here. */\n+\thugetlb_cma_reserve();\n+\thugetlb_bootmem_alloc();\n+\tsparse_init();\n+\tfor_each_node_state(nid, N_MEMORY)\n+\t\tsparse_vmemmap_init_nid_late(nid);\n+\tmemmap_init();\n }\n \n /*\ndiff --git a/mm/sparse.c b/mm/sparse.c\nindex c7f91dc2e5b5..5fe0a7e66775 100644\n--- a/mm/sparse.c\n+++ b/mm/sparse.c\n@@ -406,9 +406,6 @@ void __init sparse_init(void)\n \tpnum_begin = first_present_section_nr();\n \tnid_begin = sparse_early_nid(__nr_to_section(pnum_begin));\n \n-\t/* Setup pageblock_order for HUGETLB_PAGE_SIZE_VARIABLE */\n-\tset_pageblock_order();\n-\n \tfor_each_present_section_nr(pnum_begin + 1, pnum_end) {\n \t\tint nid = sparse_early_nid(__nr_to_section(pnum_end));\n \n", "prefixes": [ "11/49" ] }