From: Andrea Arcangeli <aarcange@redhat.com>
To: "Li, Liang Z" <liang.z.li@intel.com>
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"Kirill A. Shutemov" <kirill@shutemov.name>,
"kirill.shutemov@linux.intel.com"
<kirill.shutemov@linux.intel.com>,
Amit Shah <amit.shah@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"quintela@redhat.com" <quintela@redhat.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: post-copy is broken?
Date: Wed, 27 Apr 2016 16:47:39 +0200 [thread overview]
Message-ID: <20160427144739.GF10120@redhat.com> (raw)
In-Reply-To: <F2CBF3009FA73547804AE4C663CAB28E041813A6@shsmsx102.ccr.corp.intel.com>
Hello Liang,
On Mon, Apr 18, 2016 at 10:33:14AM +0000, Li, Liang Z wrote:
> If the THP is disabled, no fails.
> And your test was always passed, even when real post-copy was failed.
>
> In my env, the output of
> 'cat /sys/kernel/mm/transparent_hugepage/enabled' is:
>
> [always] ...
>
Can you test the fix?
https://marc.info/?l=linux-mm&m=146175869123580&w=2
This was not a breakage in userfaultfd nor in postcopy. userfaultfd
had no bugs and is fully rock solid and with zero chances of
generating undetected memory corruption like it was happening in v4.5.
As I suspected, the same problem would have happened with any THP
pmd_trans_huge split (swapping/inflating-balloon etc..). Postcopy just
makes it easier to reproduce the problem because it does a scattered
MADV_DONTNEED on the destination qemu guest memory for the pages
redirtied during the last precopy pass that run, or not transferred
(to allow THP faults in destination qemu during precopy), just before
starting the guest in the destination node.
Other reports of KVM memory corruption happening on v4.5 with THP
enabled will also be taken care of by the above fix.
I hope I managed to fix this in time for v4.6 final (current is
v4.6-rc5-69), so the only kernel where KVM must not be used with THP
enabled will be v4.5.
On a side note, this MADV_DONTEED trigger reminded me as soon as the
madvisev syscall is merged, loadvm_postcopy_ram_handle_discard should
start using it to reduce the enter/exit kernel to just 1 (or a few
madvisev in case we want to give a limit to the temporary buffer to
avoid the risk of allocating too much temporary RAM for very large
guests) to do the MADV_DONTNEED scattered zapping. Same thing in
virtio_balloon_handle_output.
Thanks,
Andrea
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-04-27 14:47 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <F2CBF3009FA73547804AE4C663CAB28E0417E6B1@shsmsx102.ccr.corp.intel.com>
[not found] ` <20160412175501.GB6415@work-vm>
[not found] ` <F2CBF3009FA73547804AE4C663CAB28E0417EE92@shsmsx102.ccr.corp.intel.com>
[not found] ` <F2CBF3009FA73547804AE4C663CAB28E0417EEE4@shsmsx102.ccr.corp.intel.com>
[not found] ` <20160413080545.GA2270@work-vm>
[not found] ` <20160413114103.GB2270@work-vm>
[not found] ` <20160413125053.GC2270@work-vm>
[not found] ` <20160413205132.GG26364@redhat.com>
[not found] ` <20160414123441.GF2252@work-vm>
2016-04-14 16:22 ` post-copy is broken? Andrea Arcangeli
2016-04-15 12:52 ` Kirill A. Shutemov
2016-04-15 13:42 ` Dr. David Alan Gilbert
2016-04-15 15:23 ` Kirill A. Shutemov
2016-04-15 16:34 ` Dr. David Alan Gilbert
2016-04-18 9:50 ` Li, Liang Z
2016-04-18 9:55 ` Dr. David Alan Gilbert
2016-04-18 10:06 ` Li, Liang Z
2016-04-18 10:15 ` Dr. David Alan Gilbert
2016-04-18 10:33 ` Li, Liang Z
2016-04-18 13:23 ` Dr. David Alan Gilbert
2016-04-18 17:18 ` Dr. David Alan Gilbert
2016-04-20 17:27 ` Dr. David Alan Gilbert
2016-04-21 19:21 ` Dr. David Alan Gilbert
2016-04-27 14:47 ` Andrea Arcangeli [this message]
2016-04-28 2:59 ` Li, Liang Z
2016-04-28 8:03 ` Dr. David Alan Gilbert
2016-04-15 22:19 ` Andrea Arcangeli
2016-04-18 9:40 ` Dr. David Alan Gilbert
2016-04-18 9:58 ` Li, Liang Z
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=20160427144739.GF10120@redhat.com \
--to=aarcange@redhat.com \
--cc=amit.shah@redhat.com \
--cc=dgilbert@redhat.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=kirill@shutemov.name \
--cc=liang.z.li@intel.com \
--cc=linux-mm@kvack.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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).