From: David Laight <David.Laight@ACULAB.COM>
To: 'Dapeng Mi' <dapeng1.mi@intel.com>,
"rafael@kernel.org" <rafael@kernel.org>,
"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>,
"pbonzini@redhat.com" <pbonzini@redhat.com>
Cc: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"zhenyuw@linux.intel.com" <zhenyuw@linux.intel.com>
Subject: RE: [PATCH] KVM: x86: use TPAUSE to replace PAUSE in halt polling
Date: Wed, 24 Aug 2022 14:08:16 +0000 [thread overview]
Message-ID: <66ba8291b33e440280ead8418b8b21ee@AcuMS.aculab.com> (raw)
In-Reply-To: <20220824091117.767363-1-dapeng1.mi@intel.com>
From: Dapeng Mi
> Sent: 24 August 2022 10:11
>
> TPAUSE is a new instruction on Intel processors which can instruct
> processor enters a power/performance optimized state. Halt polling
> uses PAUSE instruction to wait vCPU is waked up. The polling time
> could be long and cause extra power consumption in some cases.
>
> Use TPAUSE to replace the PAUSE instruction in halt polling to get
> a better power saving and performance.
What is the effect on wakeup latency?
Quite often that is far more important than a bit of power saving.
The automatic entry of sleep states is a PITA already.
Block 30 RT threads in cv_wait() and then do cv_broadcast().
Use ftrace to see just how long it takes the last thread
to wake up.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2022-08-24 14:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-24 9:11 [PATCH] KVM: x86: use TPAUSE to replace PAUSE in halt polling Dapeng Mi
2022-08-24 14:08 ` David Laight [this message]
2022-08-25 11:08 ` Mi, Dapeng1
2022-08-24 15:26 ` Sean Christopherson
2022-08-24 17:19 ` Paolo Bonzini
2022-08-25 12:16 ` Mi, Dapeng1
2022-08-25 11:31 ` Mi, Dapeng1
2022-08-26 10:14 ` Paolo Bonzini
2022-08-30 5:56 ` Mi, Dapeng1
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=66ba8291b33e440280ead8418b8b21ee@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=daniel.lezcano@linaro.org \
--cc=dapeng1.mi@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rafael@kernel.org \
--cc=zhenyuw@linux.intel.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).