get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.2/patches/2219956/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2219956,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2219956/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20260405125240.2558577-32-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-32-songmuchun@bytedance.com>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20260405125240.2558577-32-songmuchun@bytedance.com/",
    "date": "2026-04-05T12:52:22",
    "name": "[31/49] mm/hugetlb: remove HUGE_BOOTMEM_HVO flag and simplify pre-HVO logic",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "4d696eac199fde6ad55cd2de3c36600ebc8d53b6",
    "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-32-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/2219956/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2219956/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linuxppc-dev+bounces-19361-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=j5YbNmt4;\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-19361-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=j5YbNmt4;\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 4fpXXs0kqyz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 05 Apr 2026 22:57:01 +1000 (AEST)",
            "from boromir.ozlabs.org (localhost [127.0.0.1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4fpXXb1qZnz3cKj;\n\tSun, 05 Apr 2026 22:56:47 +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 4fpXXZ318mz2ynH\n\tfor <linuxppc-dev@lists.ozlabs.org>; Sun, 05 Apr 2026 22:56:46 +1000 (AEST)",
            "by mail-pj1-x1035.google.com with SMTP id\n 98e67ed59e1d1-3590042fa8eso2191716a91.1\n        for <linuxppc-dev@lists.ozlabs.org>;\n Sun, 05 Apr 2026 05:56:46 -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.56.39\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Sun, 05 Apr 2026 05:56:44 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1775393807;\n\tcv=none;\n b=iJ3cqn0qZxXPeLHKHY7dqtQzmh+LOFM35oKHHkzI1xB2QLNg6JddITkkEk/zLzkoB1B7ZgMAsmCtQlssXRgr/yDd5rT42MJIMzyf/Yd3AepapnemAJwof3Vqb7/7Brn5aiGzT3IyZwhkYclbUbszpLjGkx67UcyvI5QSUc/WqtZ6mRlccGRRKAQ9nu5adiuWycJ194K5cuifZn6CIbn9Zx0REl7AlS8XUmJq4lE4i3ca7YtHhhlHgecvIU8u2o6/CSp4pVnHDJ3xcAPh+Gd3aoB4D41Zui70DShnkIzPSYM545guznZJeYs4SEftM1keamRRggdRchyqsqeVabwNvg==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707;\n\tt=1775393807; c=relaxed/relaxed;\n\tbh=/Tl0DYENAt+V70Fu8vSLfAcsd763D1dzR7HZC3FaIa4=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t MIME-Version;\n b=Ka2EJnYSbrCxxVWZ8nU0wik2ilKkoFfj8+lv6aa/F7kbu79qnEPeepqgfMChhbyVPSt/a1Du6hoXb1J9Tyh9zz/+RdSj68i4jBnkZd1/chmp1XmXw0UWDRIKuSQ76ivv08Wc1rY2twzGzklseFlTVGlAYxLm5wTMhrUvE8g6gJCqxTtJSP3WRcMjiXsSSDnvJlEgKoRgGtAdt1GIyhXkaks/FDyNZOrSisOeqL7Dy5VHrASYWIUEIgf9+HGiPSdpj3SvNcH+BNeJWXtMRid7kppy/Cm7vCaqxQyHDLq8mBINEMG680jmVgPB+WCfLLbujkp7bcZtVOpIbx8qc40wjg==",
        "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=j5YbNmt4; 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=1775393804; x=1775998604;\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=/Tl0DYENAt+V70Fu8vSLfAcsd763D1dzR7HZC3FaIa4=;\n        b=j5YbNmt4pwSR1Ddja1O29zijIAeh4e/GAR4Wt2xQR84ioGHThJMqZZ+67ZSsAj9dE8\n         iV6QzjTHY9BQZYYKaRMGDFwDkTJ4MtahhNvY14yZIid0LXl3yOGE4IrDW5g12PNBzYO8\n         RX/H2C7uFn53BUTyi2M6EvHDLOc4w6gCIHOs/u6jmdMEUu12D47fVAGzI31Ts7m584y1\n         MAFBDAFpeK+AwfPJl23JBxPP8HR4K3eviNwHRywnoWojEMqyin9u6eRUQLooq1EVN2Pj\n         6JNDPq7KFs3FqGvBUAqHzhkVMGRmKitwDgIt6Poi3L+LKYt81/swwu39Pf0k0qjw4OXO\n         aWqg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1775393804; x=1775998604;\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=/Tl0DYENAt+V70Fu8vSLfAcsd763D1dzR7HZC3FaIa4=;\n        b=RKuIgmRtUimjcYNTbc9RYCLv4Xy4CSCiupQGPF6FWhFDWqGS/XoGgTHOJv0lRqF7sm\n         ST9+7QEGrO/WcSzq0hbJn4LCpaYDca0OKiTjS/eGpQKHhqBxmsRyWkMHpmQdCbAlNQao\n         VOCcHVZOfej0v9bF3wrWPbIQSJkZtTym04ycxaNn0y4eBcQDiWJrbvAoXyJ7QBuaWVqL\n         WNI9SKm9MO7vRbDcyIdJ7jF3r+yEOq/XYSTypKpua5OIStXFZHbXlo/9TuCHYquLbigH\n         /JqTIpA0MnduAjW9wQfNqDIspuB+0vlRKdYtH784eGa+CKNa4DkjzMmRAfE28pioh3+L\n         ch8g==",
        "X-Forwarded-Encrypted": "i=1;\n AJvYcCUuJ7Hkmejjax6Va0Gf6ytPSg42Bzh9lmc891le6E4yb2zkBlKl0/UwbW1ciPvAOa0JQf9FAm+mEx/pnjY=@lists.ozlabs.org",
        "X-Gm-Message-State": "AOJu0YwnFsLyms7so2NqQCmHLh/a8+LsU0MAShKK6qq74CkIvOgjdZSN\n\tATTsEcSOBpd3njdrZvtIZFy++6kCZ7ktojpBvrhryhAaHKgOzCErR2KA4XN0Scvb7gw=",
        "X-Gm-Gg": "AeBDieu+1+T1ss3d7gXnFSIxK3GmtXLVKu9uz26Bac4wyw7WI8zj2v4wheG9D0wRzi8\n\tTWTiCdNjBUZ7ZBur3XhNP/lW6/BA5ZGnSXcj92n3M9JUIFJvE5OEzxXCHRcJfFedIlxNWq8MByt\n\tYvd2IF9DL/ooo8gWTCNKuorX3g5n1c0vcluQuHQ6RapKBxCbT0HF9m0lYes5IQIsY/OjCDJXu/l\n\tDdxE3rRMpkliFt5YItR8q7KzkPD4KC7U0qbrSoXLlpE/y2QES2fD9MGPV96AEerl87XeneynZsG\n\t65hLu3Se42JkJPfSIG+tENZtx5oW4PvuD/cgBC3JelmiP89h+YMyQi0J3Kf9Ew9O67EL93SITwg\n\tc+vzIANJHSm53GhtN7lwdhMuvhWwMdUGOYQB81Q0XE86f9okLiQ4EDX6XLguzJHORCwUkS9xdBh\n\tjby2qYjgQAFe8cJ3z5Ac5+66q6Ma80BP4jrHCSAQTMskc=",
        "X-Received": "by 2002:a17:90b:1cd0:b0:35c:812:612a with SMTP id\n 98e67ed59e1d1-35de69cece4mr8333640a91.29.1775393804441;\n        Sun, 05 Apr 2026 05:56:44 -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 31/49] mm/hugetlb: remove HUGE_BOOTMEM_HVO flag and simplify\n pre-HVO logic",
        "Date": "Sun,  5 Apr 2026 20:52:22 +0800",
        "Message-Id": "<20260405125240.2558577-32-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": "The pre-HVO feature is used to optimize the vmemmap pages of HugeTLB\nbootmem pages. Previously, the HUGE_BOOTMEM_HVO flag was used to\nindicate whether a bootmem page has been pre-optimized.\n\nHowever, we can directly determine if a huge page is pre-optimized by\nchecking its section's optimization status using\nsection_vmemmap_optimizable(). The pre-initialization mechanism of\nvmemmap has been completely removed in previous patches, making the\nHUGE_BOOTMEM_HVO flag and its related checks redundant.\n\nBy directly using section_vmemmap_optimizable(), we can safely remove\nthe HUGE_BOOTMEM_HVO flag, clean up the associated state maintenance in\nstruct huge_bootmem_page, and simplify the bootmem page optimization\nchecks in the hugetlb initialization path.\n\nSigned-off-by: Muchun Song <songmuchun@bytedance.com>\n---\n include/linux/hugetlb.h |  5 ++---\n mm/hugetlb.c            | 16 ++--------------\n mm/hugetlb_vmemmap.c    |  5 -----\n 3 files changed, 4 insertions(+), 22 deletions(-)",
    "diff": "diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h\nindex 23d95ed6121f..6bedeaee9b79 100644\n--- a/include/linux/hugetlb.h\n+++ b/include/linux/hugetlb.h\n@@ -695,9 +695,8 @@ struct huge_bootmem_page {\n \tstruct cma *cma;\n };\n \n-#define HUGE_BOOTMEM_HVO\t\t0x0001\n-#define HUGE_BOOTMEM_ZONES_VALID\t0x0002\n-#define HUGE_BOOTMEM_CMA\t\t0x0004\n+#define HUGE_BOOTMEM_ZONES_VALID\tBIT(0)\n+#define HUGE_BOOTMEM_CMA\t\tBIT(1)\n \n int isolate_or_dissolve_huge_folio(struct folio *folio, struct list_head *list);\n int replace_free_hugepage_folios(unsigned long start_pfn, unsigned long end_pfn);\ndiff --git a/mm/hugetlb.c b/mm/hugetlb.c\nindex dff94ab7040a..59728e942384 100644\n--- a/mm/hugetlb.c\n+++ b/mm/hugetlb.c\n@@ -3193,11 +3193,6 @@ static void __init hugetlb_folio_init_vmemmap(struct folio *folio,\n \tprep_compound_head(&folio->page, huge_page_order(h));\n }\n \n-static bool __init hugetlb_bootmem_page_prehvo(struct huge_bootmem_page *m)\n-{\n-\treturn m->flags & HUGE_BOOTMEM_HVO;\n-}\n-\n /*\n  * memblock-allocated pageblocks might not have the migrate type set\n  * if marked with the 'noinit' flag. Set it to the default (MIGRATE_MOVABLE)\n@@ -3284,16 +3279,9 @@ static void __init gather_bootmem_prealloc_node(unsigned long nid)\n \t\t\t\t\t   OPTIMIZED_FOLIO_VMEMMAP_PAGE_STRUCTS);\n \t\tinit_new_hugetlb_folio(folio);\n \n-\t\tif (hugetlb_bootmem_page_prehvo(m)) {\n-\t\t\t/*\n-\t\t\t * If pre-HVO was done, just set the\n-\t\t\t * flag, the HVO code will then skip\n-\t\t\t * this folio.\n-\t\t\t */\n+\t\tif (section_vmemmap_optimizable(__pfn_to_section(folio_pfn(folio))))\n \t\t\tfolio_set_hugetlb_vmemmap_optimized(folio);\n-\t\t\tsection_set_order_pfn_range(folio_pfn(folio),\n-\t\t\t\t\t\t    pages_per_huge_page(h), 0);\n-\t\t}\n+\t\tsection_set_order_pfn_range(folio_pfn(folio), folio_nr_pages(folio), 0);\n \n \t\tif (hugetlb_bootmem_page_earlycma(m))\n \t\t\tfolio_set_hugetlb_cma(folio);\ndiff --git a/mm/hugetlb_vmemmap.c b/mm/hugetlb_vmemmap.c\nindex 8c567b8c67cc..a190b9b94346 100644\n--- a/mm/hugetlb_vmemmap.c\n+++ b/mm/hugetlb_vmemmap.c\n@@ -711,12 +711,7 @@ void __init hugetlb_vmemmap_optimize_bootmem_page(struct huge_bootmem_page *m)\n \tif (!READ_ONCE(vmemmap_optimize_enabled))\n \t\treturn;\n \n-\tif (!hugetlb_vmemmap_optimizable(h))\n-\t\treturn;\n-\n \tsection_set_order_pfn_range(pfn, pages_per_huge_page(h), huge_page_order(h));\n-\tif (section_vmemmap_optimizable(__pfn_to_section(pfn)))\n-\t\tm->flags |= HUGE_BOOTMEM_HVO;\n }\n \n static const struct ctl_table hugetlb_vmemmap_sysctls[] = {\n",
    "prefixes": [
        "31/49"
    ]
}