linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [v1 0/1] Allow deferred page initialization for xen pv
@ 2018-02-23 23:25 Pavel Tatashin
  2018-02-23 23:25 ` [v1 1/1] xen, mm: Allow deferred page initialization for xen pv domains Pavel Tatashin
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Tatashin @ 2018-02-23 23:25 UTC (permalink / raw)
  To: steven.sistare, daniel.m.jordan, pasha.tatashin, jgross,
	akataria, tglx, mingo, hpa, x86, boris.ostrovsky, akpm, mhocko,
	vbabka, luto, labbott, kirill.shutemov, bp, minipli, jinb.park7,
	dan.j.williams, bhe, zhang.jia, mgorman, hannes, virtualization,
	linux-kernel, xen-devel, linux-mm

>From this discussion:
https://www.spinics.net/lists/linux-mm/msg145604.html

I investigated whether it is feasible to re-enable deferred page
initialization on xen's para-vitalized domains. After studying the
code, I found non-intrusive way to do just that.

All we need to do is to assume that page-table's pages are pinned early in
boot, which is always true, and add a new PV OP call to notify guests that
boot allocator is finished, so we can set all the necessary fields in
already initialized struct pages.

I have tested this on my laptop with 64-bit kernel, but I would appreciate
if someone could provide more xen testing.

Apply against: linux-next. Enable the following configs:

CONFIG_XEN_PV=y
CONFIG_DEFERRED_STRUCT_PAGE_INIT=y
The above two are needed to test deferred page initialization on PV Xen
domains. If fix is applied correctly, dmesg should output line(s) like this
during boot:
[    0.266180] node 0 initialised, 717570 pages in 36ms

CONFIG_DEBUG_VM=y
This is needed to poison struct page's memory, otherwise it would be all
zero.

CONFIG_DEBUG_VM_PGFLAGS=y
Verifies that we do not access struct pages flags while memory is still
poisoned (struct pages are not initialized yet).

Pavel Tatashin (1):
  xen, mm: Allow deferred page initalization for xen pv domains

 arch/x86/include/asm/paravirt.h       |  9 +++++++++
 arch/x86/include/asm/paravirt_types.h |  3 +++
 arch/x86/kernel/paravirt.c            |  1 +
 arch/x86/mm/init_32.c                 |  1 +
 arch/x86/mm/init_64.c                 |  1 +
 arch/x86/xen/mmu_pv.c                 | 38 ++++++++++++++++++++++++-----------
 mm/page_alloc.c                       |  4 ----
 7 files changed, 41 insertions(+), 16 deletions(-)

-- 
2.16.2

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-02-26 13:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-23 23:25 [v1 0/1] Allow deferred page initialization for xen pv Pavel Tatashin
2018-02-23 23:25 ` [v1 1/1] xen, mm: Allow deferred page initialization for xen pv domains Pavel Tatashin
2018-02-26  7:17   ` Juergen Gross
2018-02-26 13:39     ` Pavel Tatashin

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).