From: Pavel Tatashin <pasha.tatashin@oracle.com>
To: linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org,
linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org,
linux-s390@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
x86@kernel.org, kasan-dev@googlegroups.com,
borntraeger@de.ibm.com, heiko.carstens@de.ibm.com,
davem@davemloft.net, willy@infradead.org, mhocko@kernel.org,
ard.biesheuvel@linaro.org, will.deacon@arm.com,
catalin.marinas@arm.com, sam@ravnborg.org,
mgorman@techsingularity.net, Steven.Sistare@oracle.com,
daniel.m.jordan@oracle.com, bob.picco@oracle.com
Subject: [PATCH v8 00/11] complete deferred page initialization
Date: Thu, 14 Sep 2017 18:40:22 -0400 [thread overview]
Message-ID: <d2b52cf6-2fdf-922e-2bb7-56bd0ed67bb4@oracle.com> (raw)
In-Reply-To: <20170914223517.8242-1-pasha.tatashin@oracle.com>
Copy paste error, changing the subject for the header to v8 from v7.
On 09/14/2017 06:35 PM, Pavel Tatashin wrote:
> Changelog:
> v8 - v7
> - Added Acked-by's from Dave Miller for SPARC changes
> - Fixed a minor compiling issue on tile architecture reported by kbuild
>
> v7 - v6
> - Addressed comments from Michal Hocko
> - memblock_discard() patch was removed from this series and integrated
> separately
> - Fixed bug reported by kbuild test robot new patch:
> mm: zero reserved and unavailable struct pages
> - Removed patch
> x86/mm: reserve only exiting low pages
> As, it is not needed anymore, because of the previous fix
> - Re-wrote deferred_init_memmap(), found and fixed an existing bug, where
> page variable is not reset when zone holes present.
> - Merged several patches together per Michal request
> - Added performance data including raw logs
>
> v6 - v5
> - Fixed ARM64 + kasan code, as reported by Ard Biesheuvel
> - Tested ARM64 code in qemu and found few more issues, that I fixed in this
> iteration
> - Added page roundup/rounddown to x86 and arm zeroing routines to zero the
> whole allocated range, instead of only provided address range.
> - Addressed SPARC related comment from Sam Ravnborg
> - Fixed section mismatch warnings related to memblock_discard().
>
> v5 - v4
> - Fixed build issues reported by kbuild on various configurations
>
> v4 - v3
> - Rewrote code to zero sturct pages in __init_single_page() as
> suggested by Michal Hocko
> - Added code to handle issues related to accessing struct page
> memory before they are initialized.
>
> v3 - v2
> - Addressed David Miller comments about one change per patch:
> * Splited changes to platforms into 4 patches
> * Made "do not zero vmemmap_buf" as a separate patch
>
> v2 - v1
> - Per request, added s390 to deferred "struct page" zeroing
> - Collected performance data on x86 which proofs the importance to
> keep memset() as prefetch (see below).
>
> SMP machines can benefit from the DEFERRED_STRUCT_PAGE_INIT config option,
> which defers initializing struct pages until all cpus have been started so
> it can be done in parallel.
>
> However, this feature is sub-optimal, because the deferred page
> initialization code expects that the struct pages have already been zeroed,
> and the zeroing is done early in boot with a single thread only. Also, we
> access that memory and set flags before struct pages are initialized. All
> of this is fixed in this patchset.
>
> In this work we do the following:
> - Never read access struct page until it was initialized
> - Never set any fields in struct pages before they are initialized
> - Zero struct page at the beginning of struct page initialization
>
>
> ==========================================================================
> Performance improvements on x86 machine with 8 nodes:
> Intel(R) Xeon(R) CPU E7-8895 v3 @ 2.60GHz and 1T of memory:
> TIME SPEED UP
> base no deferred: 95.796233s
> fix no deferred: 79.978956s 19.77%
>
> base deferred: 77.254713s
> fix deferred: 55.050509s 40.34%
> ==========================================================================
> SPARC M6 3600 MHz with 15T of memory
> TIME SPEED UP
> base no deferred: 358.335727s
> fix no deferred: 302.320936s 18.52%
>
> base deferred: 237.534603s
> fix deferred: 182.103003s 30.44%
> ==========================================================================
> Raw dmesg output with timestamps:
> x86 base no deferred: https://hastebin.com/ofunepurit.scala
> x86 base deferred: https://hastebin.com/ifazegeyas.scala
> x86 fix no deferred: https://hastebin.com/pegocohevo.scala
> x86 fix deferred: https://hastebin.com/ofupevikuk.scala
> sparc base no deferred: https://hastebin.com/ibobeteken.go
> sparc base deferred: https://hastebin.com/fariqimiyu.go
> sparc fix no deferred: https://hastebin.com/muhegoheyi.go
> sparc fix deferred: https://hastebin.com/xadinobutu.go
>
> Pavel Tatashin (11):
> x86/mm: setting fields in deferred pages
> sparc64/mm: setting fields in deferred pages
> mm: deferred_init_memmap improvements
> sparc64: simplify vmemmap_populate
> mm: defining memblock_virt_alloc_try_nid_raw
> mm: zero struct pages during initialization
> sparc64: optimized struct page zeroing
> mm: zero reserved and unavailable struct pages
> x86/kasan: explicitly zero kasan shadow memory
> arm64/kasan: explicitly zero kasan shadow memory
> mm: stop zeroing memory during allocation in vmemmap
>
> arch/arm64/mm/kasan_init.c | 42 ++++++++
> arch/sparc/include/asm/pgtable_64.h | 30 ++++++
> arch/sparc/mm/init_64.c | 31 +++---
> arch/x86/mm/init_64.c | 9 +-
> arch/x86/mm/kasan_init_64.c | 66 ++++++++++++
> include/linux/bootmem.h | 27 +++++
> include/linux/memblock.h | 16 +++
> include/linux/mm.h | 26 +++++
> mm/memblock.c | 60 +++++++++--
> mm/page_alloc.c | 207 ++++++++++++++++++++----------------
> mm/sparse-vmemmap.c | 15 ++-
> mm/sparse.c | 6 +-
> 12 files changed, 406 insertions(+), 129 deletions(-)
>
prev parent reply other threads:[~2017-09-14 22:41 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-14 22:35 [PATCH v7 00/11] complete deferred page initialization Pavel Tatashin
2017-09-14 22:35 ` [PATCH v8 01/11] x86/mm: setting fields in deferred pages Pavel Tatashin
2017-09-14 22:35 ` [PATCH v8 02/11] sparc64/mm: " Pavel Tatashin
2017-09-14 22:35 ` [PATCH v8 03/11] mm: deferred_init_memmap improvements Pavel Tatashin
2017-09-14 22:35 ` [PATCH v8 04/11] sparc64: simplify vmemmap_populate Pavel Tatashin
2017-09-14 22:35 ` [PATCH v8 05/11] mm: defining memblock_virt_alloc_try_nid_raw Pavel Tatashin
2017-09-14 22:35 ` [PATCH v8 06/11] mm: zero struct pages during initialization Pavel Tatashin
2017-09-14 22:35 ` [PATCH v8 07/11] sparc64: optimized struct page zeroing Pavel Tatashin
2017-09-14 22:35 ` [PATCH v8 08/11] mm: zero reserved and unavailable struct pages Pavel Tatashin
2017-09-14 22:35 ` [PATCH v8 09/11] x86/kasan: explicitly zero kasan shadow memory Pavel Tatashin
2017-09-14 22:35 ` [PATCH v8 10/11] arm64/kasan: " Pavel Tatashin
2017-09-15 1:10 ` Mark Rutland
2017-09-15 1:30 ` Pavel Tatashin
2017-09-15 20:38 ` Mark Rutland
2017-09-15 21:20 ` Pavel Tatashin
2017-09-15 21:51 ` Mark Rutland
2017-09-14 22:35 ` [PATCH v8 11/11] mm: stop zeroing memory during allocation in vmemmap Pavel Tatashin
2017-09-14 22:40 ` Pavel Tatashin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d2b52cf6-2fdf-922e-2bb7-56bd0ed67bb4@oracle.com \
--to=pasha.tatashin@oracle.com \
--cc=Steven.Sistare@oracle.com \
--cc=ard.biesheuvel@linaro.org \
--cc=bob.picco@oracle.com \
--cc=borntraeger@de.ibm.com \
--cc=catalin.marinas@arm.com \
--cc=daniel.m.jordan@oracle.com \
--cc=davem@davemloft.net \
--cc=heiko.carstens@de.ibm.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-s390@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@kernel.org \
--cc=sam@ravnborg.org \
--cc=sparclinux@vger.kernel.org \
--cc=will.deacon@arm.com \
--cc=willy@infradead.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).