get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 816464,
    "url": "http://patchwork.ozlabs.org/api/patches/816464/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170920201714.19817-2-pasha.tatashin@oracle.com/",
    "project": {
        "id": 2,
        "url": "http://patchwork.ozlabs.org/api/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": "<20170920201714.19817-2-pasha.tatashin@oracle.com>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20170920201714.19817-2-pasha.tatashin@oracle.com/",
    "date": "2017-09-20T20:17:03",
    "name": "[v9,01/12] x86/mm: setting fields in deferred pages",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "2d5d3bebc38f0d67a851ce48186714a85e374654",
    "submitter": {
        "id": 71010,
        "url": "http://patchwork.ozlabs.org/api/people/71010/?format=api",
        "name": "Pavel Tatashin",
        "email": "pasha.tatashin@oracle.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170920201714.19817-2-pasha.tatashin@oracle.com/mbox/",
    "series": [
        {
            "id": 4225,
            "url": "http://patchwork.ozlabs.org/api/series/4225/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=4225",
            "date": "2017-09-20T20:17:06",
            "name": "complete deferred page initialization",
            "version": 9,
            "mbox": "http://patchwork.ozlabs.org/series/4225/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/816464/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/816464/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "patchwork-incoming@ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xyB7954w8z9ryv\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 21 Sep 2017 06:24:53 +1000 (AEST)",
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xyB793WmYzDr5W\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 21 Sep 2017 06:24:53 +1000 (AEST)",
            "from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xy9zq4sCdzDqSL\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu, 21 Sep 2017 06:18:31 +1000 (AEST)",
            "from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233])\n\tby aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2)\n\twith ESMTP id v8KKHNKO011313\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=OK); Wed, 20 Sep 2017 20:17:23 GMT",
            "from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72])\n\tby aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id v8KKHNYG020989\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=OK); Wed, 20 Sep 2017 20:17:23 GMT",
            "from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14])\n\tby userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id\n\tv8KKHLfV007817; Wed, 20 Sep 2017 20:17:21 GMT",
            "from xakep.us.oracle.com (/10.154.127.176)\n\tby default (Oracle Beehive Gateway v4.0)\n\twith ESMTP ; Wed, 20 Sep 2017 13:17:20 -0700"
        ],
        "Authentication-Results": "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=oracle.com\n\t(client-ip=141.146.126.69; helo=aserp1040.oracle.com;\n\tenvelope-from=pasha.tatashin@oracle.com; receiver=<UNKNOWN>)",
        "From": "Pavel Tatashin <pasha.tatashin@oracle.com>",
        "To": "linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org,\n\tlinux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org,\n\tlinux-s390@vger.kernel.org, linux-arm-kernel@lists.infradead.org,\n\tx86@kernel.org, kasan-dev@googlegroups.com, borntraeger@de.ibm.com,\n\theiko.carstens@de.ibm.com, davem@davemloft.net, willy@infradead.org, \n\tmhocko@kernel.org, ard.biesheuvel@linaro.org, mark.rutland@arm.com,\n\twill.deacon@arm.com, catalin.marinas@arm.com, sam@ravnborg.org,\n\tmgorman@techsingularity.net, steven.sistare@oracle.com,\n\tdaniel.m.jordan@oracle.com, bob.picco@oracle.com",
        "Subject": "[PATCH v9 01/12] x86/mm: setting fields in deferred pages",
        "Date": "Wed, 20 Sep 2017 16:17:03 -0400",
        "Message-Id": "<20170920201714.19817-2-pasha.tatashin@oracle.com>",
        "X-Mailer": "git-send-email 2.14.1",
        "In-Reply-To": "<20170920201714.19817-1-pasha.tatashin@oracle.com>",
        "References": "<20170920201714.19817-1-pasha.tatashin@oracle.com>",
        "X-Source-IP": "aserv0021.oracle.com [141.146.126.233]",
        "X-BeenThere": "linuxppc-dev@lists.ozlabs.org",
        "X-Mailman-Version": "2.1.24",
        "Precedence": "list",
        "List-Id": "Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>",
        "List-Unsubscribe": "<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.ozlabs.org/pipermail/linuxppc-dev/>",
        "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>",
        "List-Help": "<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>",
        "List-Subscribe": "<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>",
        "Errors-To": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org",
        "Sender": "\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"
    },
    "content": "Without deferred struct page feature (CONFIG_DEFERRED_STRUCT_PAGE_INIT),\nflags and other fields in \"struct page\"es are never changed prior to first\ninitializing struct pages by going through __init_single_page().\n\nWith deferred struct page feature enabled, however, we set fields in\nregister_page_bootmem_info that are subsequently clobbered right after in\nfree_all_bootmem:\n\n        mem_init() {\n                register_page_bootmem_info();\n                free_all_bootmem();\n                ...\n        }\n\nWhen register_page_bootmem_info() is called only non-deferred struct pages\nare initialized. But, this function goes through some reserved pages which\nmight be part of the deferred, and thus are not yet initialized.\n\n  mem_init\n   register_page_bootmem_info\n    register_page_bootmem_info_node\n     get_page_bootmem\n      .. setting fields here ..\n      such as: page->freelist = (void *)type;\n\n  free_all_bootmem()\n   free_low_memory_core_early()\n    for_each_reserved_mem_region()\n     reserve_bootmem_region()\n      init_reserved_page() <- Only if this is deferred reserved page\n       __init_single_pfn()\n        __init_single_page()\n            memset(0) <-- Loose the set fields here\n\nWe end-up with issue where, currently we do not observe problem as memory\nis explicitly zeroed. But, if flag asserts are changed we can start hitting\nissues.\n\nAlso, because in this patch series we will stop zeroing struct page memory\nduring allocation, we must make sure that struct pages are properly\ninitialized prior to using them.\n\nThe deferred-reserved pages are initialized in free_all_bootmem().\nTherefore, the fix is to switch the above calls.\n\nSigned-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>\nReviewed-by: Steven Sistare <steven.sistare@oracle.com>\nReviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com>\nReviewed-by: Bob Picco <bob.picco@oracle.com>\n---\n arch/x86/mm/init_64.c | 9 +++++++--\n 1 file changed, 7 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c\nindex 5ea1c3c2636e..30fe22558720 100644\n--- a/arch/x86/mm/init_64.c\n+++ b/arch/x86/mm/init_64.c\n@@ -1182,12 +1182,17 @@ void __init mem_init(void)\n \n \t/* clear_bss() already clear the empty_zero_page */\n \n-\tregister_page_bootmem_info();\n-\n \t/* this will put all memory onto the freelists */\n \tfree_all_bootmem();\n \tafter_bootmem = 1;\n \n+\t/* Must be done after boot memory is put on freelist, because here we\n+\t * might set fields in deferred struct pages that have not yet been\n+\t * initialized, and free_all_bootmem() initializes all the reserved\n+\t * deferred pages for us.\n+\t */\n+\tregister_page_bootmem_info();\n+\n \t/* Register memory areas for /proc/kcore */\n \tkclist_add(&kcore_vsyscall, (void *)VSYSCALL_ADDR,\n \t\t\t PAGE_SIZE, KCORE_OTHER);\n",
    "prefixes": [
        "v9",
        "01/12"
    ]
}