get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 654800,
    "url": "http://patchwork.ozlabs.org/api/patches/654800/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1470143947-24443-2-git-send-email-srikar@linux.vnet.ibm.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": "<1470143947-24443-2-git-send-email-srikar@linux.vnet.ibm.com>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/1470143947-24443-2-git-send-email-srikar@linux.vnet.ibm.com/",
    "date": "2016-08-02T13:19:06",
    "name": "[1/2] mm: Allow disabling deferred struct page initialisation",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "e83e790317809c7296c03fc7184ce1562c01d5dd",
    "submitter": {
        "id": 11795,
        "url": "http://patchwork.ozlabs.org/api/people/11795/?format=api",
        "name": "Srikar Dronamraju",
        "email": "srikar@linux.vnet.ibm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1470143947-24443-2-git-send-email-srikar@linux.vnet.ibm.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/654800/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/654800/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 AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3s3cLD2fW8z9t82\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue,  2 Aug 2016 23:21:56 +1000 (AEST)",
            "from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3s3cLD1r5czDrFh\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue,  2 Aug 2016 23:21:56 +1000 (AEST)",
            "from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com\n\t[148.163.158.5])\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 3s3cHW0fsXzDqQs\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tTue,  2 Aug 2016 23:19:34 +1000 (AEST)",
            "from pps.filterd (m0098413.ppops.net [127.0.0.1])\n\tby mx0b-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id\n\tu72DErf9012080\n\tfor <linuxppc-dev@lists.ozlabs.org>; Tue, 2 Aug 2016 09:19:32 -0400",
            "from e23smtp01.au.ibm.com (e23smtp01.au.ibm.com [202.81.31.143])\n\tby mx0b-001b2d01.pphosted.com with ESMTP id 24gpcxa4h5-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <linuxppc-dev@lists.ozlabs.org>; Tue, 02 Aug 2016 09:19:32 -0400",
            "from localhost\n\tby e23smtp01.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <linuxppc-dev@lists.ozlabs.org> from <srikar@linux.vnet.ibm.com>; \n\tTue, 2 Aug 2016 23:19:27 +1000",
            "from d23dlp01.au.ibm.com (202.81.31.203)\n\tby e23smtp01.au.ibm.com (202.81.31.207) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tTue, 2 Aug 2016 23:19:26 +1000",
            "from d23relay07.au.ibm.com (d23relay07.au.ibm.com [9.190.26.37])\n\tby d23dlp01.au.ibm.com (Postfix) with ESMTP id A00F52CE8056\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tTue,  2 Aug 2016 23:19:25 +1000 (EST)",
            "from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139])\n\tby d23relay07.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n\tu72DJPTc24313904\n\tfor <linuxppc-dev@lists.ozlabs.org>; Tue, 2 Aug 2016 23:19:25 +1000",
            "from d23av04.au.ibm.com (localhost [127.0.0.1])\n\tby d23av04.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id\n\tu72DJOEG023235\n\tfor <linuxppc-dev@lists.ozlabs.org>; Tue, 2 Aug 2016 23:19:25 +1000",
            "from srdronam.in.ibm.com (srdronam.in.ibm.com [9.124.31.34])\n\tby d23av04.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id\n\tu72DJGiG023137; Tue, 2 Aug 2016 23:19:23 +1000"
        ],
        "X-IBM-Helo": "d23dlp01.au.ibm.com",
        "X-IBM-MailFrom": "srikar@linux.vnet.ibm.com",
        "X-IBM-RcptTo": "linuxppc-dev@lists.ozlabs.org",
        "From": "Srikar Dronamraju <srikar@linux.vnet.ibm.com>",
        "To": "linux-mm@kvack.org, Mel Gorman <mgorman@techsingularity.net>,\n\tVlastimil Babka <vbabka@suse.cz>, Michal Hocko <mhocko@kernel.org>,\n\tAndrew Morton <akpm@linux--foundation.org>,\n\tMichael Ellerman <mpe@ellerman.id.au>, linuxppc-dev@lists.ozlabs.org",
        "Subject": "[PATCH 1/2] mm: Allow disabling deferred struct page initialisation",
        "Date": "Tue,  2 Aug 2016 18:49:06 +0530",
        "X-Mailer": "git-send-email 2.1.4",
        "In-Reply-To": "<1470143947-24443-1-git-send-email-srikar@linux.vnet.ibm.com>",
        "References": "<1470143947-24443-1-git-send-email-srikar@linux.vnet.ibm.com>",
        "X-TM-AS-MML": "disable",
        "X-Content-Scanned": "Fidelis XPS MAILER",
        "x-cbid": "16080213-1617-0000-0000-000001428F09",
        "X-IBM-AV-DETECTION": "SAVI=unused REMOTE=unused XFE=unused",
        "x-cbparentid": "16080213-1618-0000-0000-000046686E5A",
        "Message-Id": "<1470143947-24443-2-git-send-email-srikar@linux.vnet.ibm.com>",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2016-08-02_09:, , signatures=0",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000\n\tdefinitions=main-1608020136",
        "X-BeenThere": "linuxppc-dev@lists.ozlabs.org",
        "X-Mailman-Version": "2.1.22",
        "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>",
        "Cc": "Srikar Dronamraju <srikar@linux.vnet.ibm.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "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": "Kernels compiled with CONFIG_DEFERRED_STRUCT_PAGE_INIT will initialise\nonly certain size memory per node. The certain size takes into account\nthe dentry and inode cache sizes. However such a kernel when booting a\nsecondary kernel will not be able to allocate the required amount of\nmemory to suffice for the dentry and inode caches. This results in\ncrashes like the below on large systems such as 32 TB systems.\n\nDentry cache hash table entries: 536870912 (order: 16, 4294967296 bytes)\nvmalloc: allocation failure, allocated 4097114112 of 17179934720 bytes\nswapper/0: page allocation failure: order:0, mode:0x2080020(GFP_ATOMIC)\nCPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.6-master+ #3\nCall Trace:\n[c00000000108fb10] [c0000000007fac88] dump_stack+0xb0/0xf0 (unreliable)\n[c00000000108fb50] [c000000000235264] warn_alloc_failed+0x114/0x160\n[c00000000108fbf0] [c000000000281484] __vmalloc_node_range+0x304/0x340\n[c00000000108fca0] [c00000000028152c] __vmalloc+0x6c/0x90\n[c00000000108fd40] [c000000000aecfb0]\nalloc_large_system_hash+0x1b8/0x2c0\n[c00000000108fe00] [c000000000af7240] inode_init+0x94/0xe4\n[c00000000108fe80] [c000000000af6fec] vfs_caches_init+0x8c/0x13c\n[c00000000108ff00] [c000000000ac4014] start_kernel+0x50c/0x578\n[c00000000108ff90] [c000000000008c6c] start_here_common+0x20/0xa8\n\nAllow such kernels to disable deferred page struct initialisation.\n\nSigned-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>\n---\n include/linux/mmzone.h |  2 +-\n mm/page_alloc.c        | 20 ++++++++++++++++++++\n 2 files changed, 21 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h\nindex c60df92..1c55200 100644\n--- a/include/linux/mmzone.h\n+++ b/include/linux/mmzone.h\n@@ -1203,7 +1203,7 @@ unsigned long __init node_memmap_size_bytes(int, unsigned long, unsigned long);\n #else\n #define pfn_valid_within(pfn) (1)\n #endif\n-\n+void disable_deferred_meminit(void);\n #ifdef CONFIG_ARCH_HAS_HOLES_MEMORYMODEL\n /*\n  * pfn_valid() is meant to be able to tell if a given PFN has valid memmap\ndiff --git a/mm/page_alloc.c b/mm/page_alloc.c\nindex c1069ef..dc6ebac 100644\n--- a/mm/page_alloc.c\n+++ b/mm/page_alloc.c\n@@ -301,6 +301,19 @@ static inline bool early_page_nid_uninitialised(unsigned long pfn, int nid)\n }\n \n /*\n+ * Deferred struct page initialisation may not work on a multinode machine,\n+ * if a significant amount of memory is reserved at early boot.  Allow apis\n+ * that reserve significant memory to disable deferred struct page\n+ * initialisation.\n+ */\n+static bool defer_init_disabled;\n+\n+void disable_deferred_meminit(void)\n+{\n+\tdefer_init_disabled = true;\n+}\n+\n+/*\n  * Returns false when the remaining initialisation should be deferred until\n  * later in the boot cycle when it can be parallelised.\n  */\n@@ -313,6 +326,9 @@ static inline bool update_defer_init(pg_data_t *pgdat,\n \t/* Always populate low zones for address-contrained allocations */\n \tif (zone_end < pgdat_end_pfn(pgdat))\n \t\treturn true;\n+\n+\tif (defer_init_disabled)\n+\t\treturn true;\n \t/*\n \t * Initialise at least 2G of a node but also take into account that\n \t * two large system hashes that can take up 1GB for 0.25TB/node.\n@@ -350,6 +366,10 @@ static inline bool update_defer_init(pg_data_t *pgdat,\n {\n \treturn true;\n }\n+void disable_deferred_meminit(void)\n+{\n+}\n+\n #endif\n \n \n",
    "prefixes": [
        "1/2"
    ]
}