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
Subject: [v5 00/15] complete deferred page initialization
Date: Thu, 3 Aug 2017 17:23:38 -0400 [thread overview]
Message-ID: <1501795433-982645-1-git-send-email-pasha.tatashin@oracle.com> (raw)
Changelog:
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
Single threaded struct page init: 7.6s/T improvement
Deferred struct page init: 10.2s/T improvement
Pavel Tatashin (15):
x86/mm: reserve only exiting low pages
x86/mm: setting fields in deferred pages
sparc64/mm: setting fields in deferred pages
mm: discard memblock data later
mm: don't accessed uninitialized struct pages
sparc64: simplify vmemmap_populate
mm: defining memblock_virt_alloc_try_nid_raw
mm: zero struct pages during initialization
sparc64: optimized struct page zeroing
x86/kasan: explicitly zero kasan shadow memory
arm64/kasan: explicitly zero kasan shadow memory
mm: explicitly zero pagetable memory
mm: stop zeroing memory during allocation in vmemmap
mm: optimize early system hash allocations
mm: debug for raw alloctor
arch/arm64/mm/kasan_init.c | 32 ++++++++
arch/sparc/include/asm/pgtable_64.h | 32 ++++++++
arch/sparc/mm/init_64.c | 31 +++-----
arch/x86/kernel/setup.c | 5 +-
arch/x86/mm/init_64.c | 9 ++-
arch/x86/mm/kasan_init_64.c | 29 +++++++
include/linux/bootmem.h | 27 +++++++
include/linux/memblock.h | 9 ++-
include/linux/mm.h | 9 +++
mm/memblock.c | 152 ++++++++++++++++++++++++++++--------
mm/nobootmem.c | 16 ----
mm/page_alloc.c | 31 +++++---
mm/sparse-vmemmap.c | 10 ++-
mm/sparse.c | 6 +-
14 files changed, 310 insertions(+), 88 deletions(-)
--
2.13.4
next reply other threads:[~2017-08-03 21:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-03 21:23 Pavel Tatashin [this message]
2017-08-03 21:23 ` [v5 01/15] x86/mm: reserve only exiting low pages Pavel Tatashin
2017-08-03 21:23 ` [v5 02/15] x86/mm: setting fields in deferred pages Pavel Tatashin
2017-08-03 21:23 ` [v5 03/15] sparc64/mm: " Pavel Tatashin
2017-08-03 21:23 ` [v5 04/15] mm: discard memblock data later Pavel Tatashin
2017-08-03 21:23 ` [v5 05/15] mm: don't accessed uninitialized struct pages Pavel Tatashin
2017-08-03 21:23 ` [v5 06/15] sparc64: simplify vmemmap_populate Pavel Tatashin
2017-08-03 21:23 ` [v5 07/15] mm: defining memblock_virt_alloc_try_nid_raw Pavel Tatashin
2017-08-03 21:23 ` [v5 08/15] mm: zero struct pages during initialization Pavel Tatashin
2017-08-03 21:23 ` [v5 09/15] sparc64: optimized struct page zeroing Pavel Tatashin
2017-08-04 5:37 ` Sam Ravnborg
2017-08-04 13:50 ` Pasha Tatashin
2017-08-03 21:23 ` [v5 10/15] x86/kasan: explicitly zero kasan shadow memory Pavel Tatashin
2017-08-03 21:23 ` [v5 11/15] arm64/kasan: " Pavel Tatashin
2017-08-04 0:14 ` Ard Biesheuvel
2017-08-04 14:01 ` Pasha Tatashin
2017-08-03 21:23 ` [v5 12/15] mm: explicitly zero pagetable memory Pavel Tatashin
2017-08-03 21:23 ` [v5 13/15] mm: stop zeroing memory during allocation in vmemmap Pavel Tatashin
2017-08-03 21:23 ` [v5 14/15] mm: optimize early system hash allocations Pavel Tatashin
2017-08-03 21:23 ` [v5 15/15] mm: debug for raw alloctor Pavel Tatashin
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=1501795433-982645-1-git-send-email-pasha.tatashin@oracle.com \
--to=pasha.tatashin@oracle.com \
--cc=borntraeger@de.ibm.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=mhocko@kernel.org \
--cc=sparclinux@vger.kernel.org \
--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).