From: Sean Christopherson <seanjc@google.com>
To: bugzilla-daemon@kernel.org
Cc: kvm@vger.kernel.org
Subject: Re: [Bug 218259] High latency in KVM guests
Date: Tue, 19 Dec 2023 07:16:03 -0800 [thread overview]
Message-ID: <ZYGzsxv9jANSYuX0@google.com> (raw)
In-Reply-To: <bug-218259-28872-h88Ho5XI7I@https.bugzilla.kernel.org/>
On Tue, Dec 19, 2023, bugzilla-daemon@kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=218259
>
> --- Comment #6 from Joern Heissler (kernelbugs2012@joern-heissler.de) ---
> (In reply to Sean Christopherson from comment #5)
>
> > This is likely/hopefully the same thing Yan encountered[1]. If you are able
> > to
> > test patches, the proposed fix[2] applies cleanly on v6.6 (note, I need to
> > post a
> > refreshed version of the series regardless), any feedback you can provide
> > would
> > be much appreciated.
> >
> > [1] https://lore.kernel.org/all/ZNnPF4W26ZbAyGto@yzhao56-desk.sh.intel.com
> > [2] https://lore.kernel.org/all/20230825020733.2849862-1-seanjc@google.com
>
> I admit that I don't understand most of what's written in the those threads.
LOL, no worries, sometimes none of us understand what's written either ;-)
> I applied the two patches from [2] (excluding [3]) to v6.6 and it appears to
> solve the problem.
>
> However I haven't measured how/if any of the changes/flags affect performance
> or if any other problems are caused. After about 1 hour uptime it appears to be
> okay.
Don't worry too much about additional testing. Barring a straight up bug (knock
wood), the changes in those patches have a very, very low probability of
introducing unwanted side effects.
> > KVM changes aside, I highly recommend evaluating whether or not NUMA
> > autobalancing is a net positive for your environment. The interactions
> > between
> > autobalancing and KVM are often less than stellar, and disabling
> > autobalancing
> > is sometimes a completely legitimate option/solution.
>
> I'll have to evaluate multiple options for my production environment.
> Patching+Building the kernel myself would only be a last resort. And it will
> probably take a while until Debian ships a patch for the issue. So maybe
> disable the NUMA balancing, or perhaps try to pin a VM's memory+cpu to a single
> NUMA node.
Another viable option is to disable the TDP MMU, at least until the above patches
land and are picked up by Debian. You could even reference commit 7e546bd08943
("Revert "KVM: x86: enable TDP MMU by default"") from the v5.15 stable tree if
you want a paper trail that provides some justification as to why it's ok to revert
back to the "old" MMU.
Quoting from that:
: As far as what is lost by disabling the TDP MMU, the main selling point of
: the TDP MMU is its ability to service page fault VM-Exits in parallel,
: i.e. the main benefactors of the TDP MMU are deployments of large VMs
: (hundreds of vCPUs), and in particular delployments that live-migrate such
: VMs and thus need to fault-in huge amounts of memory on many vCPUs after
: restarting the VM after migration.
In other words, the old MMU is not broken, e.g. it didn't suddently become unusable
after 15+ years of use. We enabled the newfangled TDP MMU by default because it
is the long-term replacement, e.g. it can scale to support use cases that the old
MMU falls over on, and we want to put the old MMU into maintenance-only mode.
But we are still ironing out some wrinkles in the TDP MMU, particularly for host
kernels that support preemption (the kernel has lock contention logic that is
unique to preemptible kernels). And in the meantime, for most KVM use cases, the
old MMU is still perfectly servicable.
next prev parent reply other threads:[~2023-12-19 15:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-12 16:37 [Bug 218259] New: High latency in KVM guests bugzilla-daemon
2023-12-13 16:54 ` Sean Christopherson
2023-12-13 16:54 ` [Bug 218259] " bugzilla-daemon
2023-12-14 7:14 ` bugzilla-daemon
2023-12-18 17:07 ` Sean Christopherson
2023-12-14 7:15 ` bugzilla-daemon
2023-12-14 7:16 ` bugzilla-daemon
2023-12-18 17:07 ` bugzilla-daemon
2024-01-11 15:55 ` Sean Christopherson
2023-12-19 14:09 ` bugzilla-daemon
2023-12-19 15:16 ` Sean Christopherson [this message]
2023-12-19 15:16 ` bugzilla-daemon
2024-01-11 15:55 ` bugzilla-daemon
2024-01-16 13:29 ` bugzilla-daemon
2024-01-17 1:05 ` Sean Christopherson
2024-01-17 1:05 ` bugzilla-daemon
2024-01-17 14:04 ` bugzilla-daemon
2024-11-05 0:27 ` bugzilla-daemon
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=ZYGzsxv9jANSYuX0@google.com \
--to=seanjc@google.com \
--cc=bugzilla-daemon@kernel.org \
--cc=kvm@vger.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