{"id":813992,"url":"http://patchwork.ozlabs.org/api/covers/813992/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-imx/cover/d2b52cf6-2fdf-922e-2bb7-56bd0ed67bb4@oracle.com/","project":{"id":19,"url":"http://patchwork.ozlabs.org/api/projects/19/?format=json","name":"Linux IMX development","link_name":"linux-imx","list_id":"linux-imx-kernel.lists.patchwork.ozlabs.org","list_email":"linux-imx-kernel@lists.patchwork.ozlabs.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<d2b52cf6-2fdf-922e-2bb7-56bd0ed67bb4@oracle.com>","list_archive_url":null,"date":"2017-09-14T22:40:22","name":"[v8,00/11] complete deferred page initialization","submitter":{"id":71010,"url":"http://patchwork.ozlabs.org/api/people/71010/?format=json","name":"Pavel Tatashin","email":"pasha.tatashin@oracle.com"},"mbox":"http://patchwork.ozlabs.org/project/linux-imx/cover/d2b52cf6-2fdf-922e-2bb7-56bd0ed67bb4@oracle.com/mbox/","series":[{"id":3175,"url":"http://patchwork.ozlabs.org/api/series/3175/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-imx/list/?series=3175","date":"2017-09-14T22:40:22","name":"complete deferred page initialization","version":8,"mbox":"http://patchwork.ozlabs.org/series/3175/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/813992/comments/","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"bAQbiB+P\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xtYS43J6Kz9sCZ\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tFri, 15 Sep 2017 08:41:56 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dscpU-0006Ts-4T; Thu, 14 Sep 2017 22:41:52 +0000","from userp1040.oracle.com ([156.151.31.81])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dscou-000627-0T for linux-arm-kernel@lists.infradead.org;\n\tThu, 14 Sep 2017 22:41:49 +0000","from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74])\n\tby userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with\n\tESMTP id v8EMeLh2002278\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=OK); Thu, 14 Sep 2017 22:40:21 GMT","from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75])\n\tby userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v8EMeLlV005360\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=OK); Thu, 14 Sep 2017 22:40:21 GMT","from ubhmp0013.oracle.com (ubhmp0013.oracle.com [156.151.24.66])\n\tby userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v8EMeKi7005854; \n\tThu, 14 Sep 2017 22:40:20 GMT","from [172.20.162.102] (/12.145.98.253)\n\tby default (Oracle Beehive Gateway v4.0)\n\twith ESMTP ; Thu, 14 Sep 2017 22:40:19 +0000"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:\n\tContent-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive:\n\tList-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From:\n\tReferences:To:Subject:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=fXyiP0GLdtOzXqolngqZJaP4H5483bOfrNbYCMGkNEI=;\n\tb=bAQbiB+PgSqMFiTkzxKfYbyzt\n\tI7/z+3j/os5rXhZvSQHGmoZu5oROqafiKJ1Q2JLUH3f/P+NxZ93S6QazMdOuLNlugGl1uoCgr1iR8\n\t6PoFgCcfPBGUpRmb0PI2kYVz8oXfDN1DriYT5u5i1PJghg+dIsKS685vttfewp3kcHR/CnlTPsrvC\n\tc8JxWKQ3GG+lUQ4Jc9jr78iIJRfh5oBGJE69bNCDkUrD0OsaFKhBofpnWRAXi4cpumNqFt/DdEV0c\n\tl3tMaziO6zqe2Q9g9hFZ2AgTZiJuxeBBD0YkYba4WmvSH9vvu4/8ZRO5HQVmmQ5RfT6Ywnaq2qHpt\n\t4FKiudwmA==;","Subject":"[PATCH v8 00/11] complete deferred page initialization","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","References":"<20170914223517.8242-1-pasha.tatashin@oracle.com>","From":"Pavel Tatashin <pasha.tatashin@oracle.com>","Message-ID":"<d2b52cf6-2fdf-922e-2bb7-56bd0ed67bb4@oracle.com>","Date":"Thu, 14 Sep 2017 18:40:22 -0400","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170914223517.8242-1-pasha.tatashin@oracle.com>","Content-Language":"en-US","X-Source-IP":"userv0022.oracle.com [156.151.31.74]","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170914_154116_629468_65738B3E ","X-CRM114-Status":"GOOD (  19.76  )","X-Spam-Score":"-7.0 (-------)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-7.0 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\n\tmedium trust [156.151.31.81 listed in list.dnswl.org]\n\t-2.8 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)\n\t[156.151.31.81 listed in wl.mailspike.net]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Content-Transfer-Encoding":"7bit","Content-Type":"text/plain; charset=\"us-ascii\"; Format=\"flowed\"","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"},"content":"Copy paste error, changing the subject for the header to v8 from v7.\n\nOn 09/14/2017 06:35 PM, Pavel Tatashin wrote:\n> Changelog:\n> v8 - v7\n> - Added Acked-by's from Dave Miller for SPARC changes\n> - Fixed a minor compiling issue on tile architecture reported by kbuild\n>\n> v7 - v6\n> - Addressed comments from Michal Hocko\n> - memblock_discard() patch was removed from this series and integrated\n>    separately\n> - Fixed bug reported by kbuild test robot new patch:\n>    mm: zero reserved and unavailable struct pages\n> - Removed patch\n>    x86/mm: reserve only exiting low pages\n>    As, it is not needed anymore, because of the previous fix\n> - Re-wrote deferred_init_memmap(), found and fixed an existing bug, where\n>    page variable is not reset when zone holes present.\n> - Merged several patches together per Michal request\n> - Added performance data including raw logs\n>\n> v6 - v5\n> - Fixed ARM64 + kasan code, as reported by Ard Biesheuvel\n> - Tested ARM64 code in qemu and found few more issues, that I fixed in this\n>    iteration\n> - Added page roundup/rounddown to x86 and arm zeroing routines to zero the\n>    whole allocated range, instead of only provided address range.\n> - Addressed SPARC related comment from Sam Ravnborg\n> - Fixed section mismatch warnings related to memblock_discard().\n>\n> v5 - v4\n> - Fixed build issues reported by kbuild on various configurations\n>\n> v4 - v3\n> - Rewrote code to zero sturct pages in __init_single_page() as\n>    suggested by Michal Hocko\n> - Added code to handle issues related to accessing struct page\n>    memory before they are initialized.\n>\n> v3 - v2\n> - Addressed David Miller comments about one change per patch:\n>      * Splited changes to platforms into 4 patches\n>      * Made \"do not zero vmemmap_buf\" as a separate patch\n>\n> v2 - v1\n> - Per request, added s390 to deferred \"struct page\" zeroing\n> - Collected performance data on x86 which proofs the importance to\n>    keep memset() as prefetch (see below).\n>\n> SMP machines can benefit from the DEFERRED_STRUCT_PAGE_INIT config option,\n> which defers initializing struct pages until all cpus have been started so\n> it can be done in parallel.\n>\n> However, this feature is sub-optimal, because the deferred page\n> initialization code expects that the struct pages have already been zeroed,\n> and the zeroing is done early in boot with a single thread only.  Also, we\n> access that memory and set flags before struct pages are initialized. All\n> of this is fixed in this patchset.\n>\n> In this work we do the following:\n> - Never read access struct page until it was initialized\n> - Never set any fields in struct pages before they are initialized\n> - Zero struct page at the beginning of struct page initialization\n>\n>\n> ==========================================================================\n> Performance improvements on x86 machine with 8 nodes:\n> Intel(R) Xeon(R) CPU E7-8895 v3 @ 2.60GHz and 1T of memory:\n>                          TIME          SPEED UP\n> base no deferred:       95.796233s\n> fix no deferred:        79.978956s    19.77%\n>\n> base deferred:          77.254713s\n> fix deferred:           55.050509s    40.34%\n> ==========================================================================\n> SPARC M6 3600 MHz with 15T of memory\n>                          TIME          SPEED UP\n> base no deferred:       358.335727s\n> fix no deferred:        302.320936s   18.52%\n>\n> base deferred:          237.534603s\n> fix deferred:           182.103003s   30.44%\n> ==========================================================================\n> Raw dmesg output with timestamps:\n> x86 base no deferred:    https://hastebin.com/ofunepurit.scala\n> x86 base deferred:       https://hastebin.com/ifazegeyas.scala\n> x86 fix no deferred:     https://hastebin.com/pegocohevo.scala\n> x86 fix deferred:        https://hastebin.com/ofupevikuk.scala\n> sparc base no deferred:  https://hastebin.com/ibobeteken.go\n> sparc base deferred:     https://hastebin.com/fariqimiyu.go\n> sparc fix no deferred:   https://hastebin.com/muhegoheyi.go\n> sparc fix deferred:      https://hastebin.com/xadinobutu.go\n>\n> Pavel Tatashin (11):\n>    x86/mm: setting fields in deferred pages\n>    sparc64/mm: setting fields in deferred pages\n>    mm: deferred_init_memmap improvements\n>    sparc64: simplify vmemmap_populate\n>    mm: defining memblock_virt_alloc_try_nid_raw\n>    mm: zero struct pages during initialization\n>    sparc64: optimized struct page zeroing\n>    mm: zero reserved and unavailable struct pages\n>    x86/kasan: explicitly zero kasan shadow memory\n>    arm64/kasan: explicitly zero kasan shadow memory\n>    mm: stop zeroing memory during allocation in vmemmap\n>\n>   arch/arm64/mm/kasan_init.c          |  42 ++++++++\n>   arch/sparc/include/asm/pgtable_64.h |  30 ++++++\n>   arch/sparc/mm/init_64.c             |  31 +++---\n>   arch/x86/mm/init_64.c               |   9 +-\n>   arch/x86/mm/kasan_init_64.c         |  66 ++++++++++++\n>   include/linux/bootmem.h             |  27 +++++\n>   include/linux/memblock.h            |  16 +++\n>   include/linux/mm.h                  |  26 +++++\n>   mm/memblock.c                       |  60 +++++++++--\n>   mm/page_alloc.c                     | 207 ++++++++++++++++++++----------------\n>   mm/sparse-vmemmap.c                 |  15 ++-\n>   mm/sparse.c                         |   6 +-\n>   12 files changed, 406 insertions(+), 129 deletions(-)\n>"}