From: Juergen Gross <jgross@suse.com>
To: "Srivatsa S. Bhat" <srivatsa@csail.mit.edu>,
linux-kernel@vger.kernel.org
Cc: amakhalov@vmware.com, ganb@vmware.com, ankitja@vmware.com,
bordoloih@vmware.com, keerthanak@vmware.com,
blamoreaux@vmware.com, namit@vmware.com,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
"Paul E. McKenney" <paulmck@kernel.org>,
Wyes Karny <wyes.karny@amd.com>,
Lewis Caroll <lewis.carroll@amd.com>,
Tom Lendacky <thomas.lendacky@amd.com>,
x86@kernel.org,
VMware PV-Drivers Reviewers <pv-drivers@vmware.com>,
virtualization@lists.linux-foundation.org, kvm@vger.kernel.org,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2] x86/hotplug: Do not put offline vCPUs in mwait idle state
Date: Mon, 16 Jan 2023 09:38:25 +0100 [thread overview]
Message-ID: <1375c16c-1a81-f845-f9e6-d698148c4ffc@suse.com> (raw)
In-Reply-To: <20230116060134.80259-1-srivatsa@csail.mit.edu>
[-- Attachment #1.1.1: Type: text/plain, Size: 2006 bytes --]
On 16.01.23 07:01, Srivatsa S. Bhat wrote:
> From: "Srivatsa S. Bhat (VMware)" <srivatsa@csail.mit.edu>
>
> Under hypervisors that support mwait passthrough, a vCPU in mwait
> CPU-idle state remains in guest context (instead of yielding to the
> hypervisor via VMEXIT), which helps speed up wakeups from idle.
>
> However, this runs into problems with CPU hotplug, because the Linux
> CPU offline path prefers to put the vCPU-to-be-offlined in mwait
> state, whenever mwait is available. As a result, since a vCPU in mwait
> remains in guest context and does not yield to the hypervisor, an
> offline vCPU *appears* to be 100% busy as viewed from the host, which
> prevents the hypervisor from running other vCPUs or workloads on the
> corresponding pCPU. [ Note that such a vCPU is not actually busy
> spinning though; it remains in mwait idle state in the guest ].
>
> Fix this by preventing the use of mwait idle state in the vCPU offline
> play_dead() path for any hypervisor, even if mwait support is
> available.
>
> Suggested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> Signed-off-by: Srivatsa S. Bhat (VMware) <srivatsa@csail.mit.edu>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
> Cc: "Paul E. McKenney" <paulmck@kernel.org>
> Cc: Wyes Karny <wyes.karny@amd.com>
> Cc: Lewis Caroll <lewis.carroll@amd.com>
> Cc: Tom Lendacky <thomas.lendacky@amd.com>
> Cc: Alexey Makhalov <amakhalov@vmware.com>
> Cc: Juergen Gross <jgross@suse.com>
> Cc: x86@kernel.org
> Cc: VMware PV-Drivers Reviewers <pv-drivers@vmware.com>
> Cc: virtualization@lists.linux-foundation.org
> Cc: kvm@vger.kernel.org
> Cc: xen-devel@lists.xenproject.org
Reviewed-by: Juergen Gross <jgross@suse.com>
Juergen
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3149 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
next prev parent reply other threads:[~2023-01-16 8:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-16 6:01 [PATCH v2] x86/hotplug: Do not put offline vCPUs in mwait idle state Srivatsa S. Bhat
2023-01-16 8:38 ` Juergen Gross [this message]
2023-01-16 14:55 ` Igor Mammedov
2023-01-19 21:12 ` Thomas Gleixner
2023-01-20 13:55 ` Srivatsa S. Bhat
2023-01-20 15:37 ` Igor Mammedov
2023-01-20 18:35 ` Sean Christopherson
2023-01-26 2:14 ` Srivatsa S. Bhat
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=1375c16c-1a81-f845-f9e6-d698148c4ffc@suse.com \
--to=jgross@suse.com \
--cc=amakhalov@vmware.com \
--cc=ankitja@vmware.com \
--cc=blamoreaux@vmware.com \
--cc=bordoloih@vmware.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=ganb@vmware.com \
--cc=hpa@zytor.com \
--cc=keerthanak@vmware.com \
--cc=kvm@vger.kernel.org \
--cc=lewis.carroll@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namit@vmware.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=pv-drivers@vmware.com \
--cc=rafael.j.wysocki@intel.com \
--cc=srivatsa@csail.mit.edu \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=wyes.karny@amd.com \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xenproject.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).