get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 813983,
    "url": "http://patchwork.ozlabs.org/api/patches/813983/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170914223517.8242-7-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": "<20170914223517.8242-7-pasha.tatashin@oracle.com>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20170914223517.8242-7-pasha.tatashin@oracle.com/",
    "date": "2017-09-14T22:35:12",
    "name": "[v8,06/11] mm: zero struct pages during initialization",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "bbba9dd70f2b4ea93ef2afb134b614f5c710b8fc",
    "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/20170914223517.8242-7-pasha.tatashin@oracle.com/mbox/",
    "series": [
        {
            "id": 3173,
            "url": "http://patchwork.ozlabs.org/api/series/3173/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=3173",
            "date": "2017-09-14T22:35:12",
            "name": "complete deferred page initialization",
            "version": 8,
            "mbox": "http://patchwork.ozlabs.org/series/3173/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/813983/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/813983/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 [103.22.144.68])\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 3xtYNB5HHdz9s7h\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 15 Sep 2017 08:38:34 +1000 (AEST)",
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xtYNB4JzSzDrXS\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 15 Sep 2017 08:38:34 +1000 (AEST)",
            "from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81])\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 3xtYL34GmszDrVs\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri, 15 Sep 2017 08:36:43 +1000 (AEST)",
            "from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234])\n\tby userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2)\n\twith ESMTP id v8EMZY0D030118\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=OK); Thu, 14 Sep 2017 22:35:34 GMT",
            "from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75])\n\tby aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v8EMZXDN023166\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=OK); Thu, 14 Sep 2017 22:35:34 GMT",
            "from ubhmp0003.oracle.com (ubhmp0003.oracle.com [156.151.24.56])\n\tby userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v8EMZXli003996; \n\tThu, 14 Sep 2017 22:35:33 GMT",
            "from cmex.localdomain (/12.145.98.253)\n\tby default (Oracle Beehive Gateway v4.0)\n\twith ESMTP ; Thu, 14 Sep 2017 22:35:33 +0000"
        ],
        "Authentication-Results": "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=oracle.com\n\t(client-ip=156.151.31.81; helo=userp1040.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, will.deacon@arm.com,\n\tcatalin.marinas@arm.com, sam@ravnborg.org, mgorman@techsingularity.net,\n\tSteven.Sistare@oracle.com, daniel.m.jordan@oracle.com,\n\tbob.picco@oracle.com",
        "Subject": "[PATCH v8 06/11] mm: zero struct pages during initialization",
        "Date": "Thu, 14 Sep 2017 18:35:12 -0400",
        "Message-Id": "<20170914223517.8242-7-pasha.tatashin@oracle.com>",
        "X-Mailer": "git-send-email 2.14.1",
        "In-Reply-To": "<20170914223517.8242-1-pasha.tatashin@oracle.com>",
        "References": "<20170914223517.8242-1-pasha.tatashin@oracle.com>",
        "X-Source-IP": "aserv0022.oracle.com [141.146.126.234]",
        "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": "Add struct page zeroing as a part of initialization of other fields in\n__init_single_page().\n\nThis single thread performance collected on: Intel(R) Xeon(R) CPU E7-8895\nv3 @ 2.60GHz with 1T of memory (268400646 pages in 8 nodes):\n\n                        BASE            FIX\nsparse_init     11.244671836s   0.007199623s\nzone_sizes_init  4.879775891s   8.355182299s\n                  --------------------------\nTotal           16.124447727s   8.362381922s\n\nsparse_init is where memory for struct pages is zeroed, and the zeroing\npart is moved later in this patch into __init_single_page(), which is\ncalled from zone_sizes_init().\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>\nAcked-by: Michal Hocko <mhocko@suse.com>\n---\n include/linux/mm.h | 9 +++++++++\n mm/page_alloc.c    | 1 +\n 2 files changed, 10 insertions(+)",
    "diff": "diff --git a/include/linux/mm.h b/include/linux/mm.h\nindex f8c10d336e42..50b74d628243 100644\n--- a/include/linux/mm.h\n+++ b/include/linux/mm.h\n@@ -94,6 +94,15 @@ extern int mmap_rnd_compat_bits __read_mostly;\n #define mm_forbids_zeropage(X)\t(0)\n #endif\n \n+/*\n+ * On some architectures it is expensive to call memset() for small sizes.\n+ * Those architectures should provide their own implementation of \"struct page\"\n+ * zeroing by defining this macro in <asm/pgtable.h>.\n+ */\n+#ifndef mm_zero_struct_page\n+#define mm_zero_struct_page(pp)  ((void)memset((pp), 0, sizeof(struct page)))\n+#endif\n+\n /*\n  * Default maximum number of active map areas, this limits the number of vmas\n  * per mm struct. Users can overwrite this number by sysctl but there is a\ndiff --git a/mm/page_alloc.c b/mm/page_alloc.c\nindex a8dbd405ed94..4b630ee91430 100644\n--- a/mm/page_alloc.c\n+++ b/mm/page_alloc.c\n@@ -1170,6 +1170,7 @@ static void free_one_page(struct zone *zone,\n static void __meminit __init_single_page(struct page *page, unsigned long pfn,\n \t\t\t\tunsigned long zone, int nid)\n {\n+\tmm_zero_struct_page(page);\n \tset_page_links(page, zone, nid, pfn);\n \tinit_page_count(page);\n \tpage_mapcount_reset(page);\n",
    "prefixes": [
        "v8",
        "06/11"
    ]
}