From: "Kiryl Shutsemau (Meta)" <kas@kernel.org>
To: Moe Mahhouk <moe@flashbots.net>
Cc: Rick Edgecombe <rick.p.edgecombe@intel.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Erdem Aktas <erdemaktas@google.com>,
Tom Lendacky <thomas.lendacky@amd.com>,
Dan Williams <djbw@kernel.org>,
Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@linux.intel.com>,
Xiaoyao Li <xiaoyao.li@intel.com>, Jun Miao <jun.miao@intel.com>,
x86@kernel.org, linux-coco@lists.linux.dev, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/2] virt: tdx-guest: Poll Quote status every 10 ms
Date: Fri, 4 Dec 2026 15:43:42 -0800 [thread overview]
Message-ID: <axNQHWNIVO4Xe8Eh@shutemov.name> (raw)
In-Reply-To: <20261125-tdx-guest-quote-poll-v4-2-d89f26854b88@flashbots.net>
On Wed, Nov 25, 2026 at 02:11:51PM +0000, Moe Mahhouk wrote:
> wait_for_quote_completion() checks the status of a GetQuote request
> once and then sleeps for a full second before each further check. The
> VMM has rarely completed the request at the first check, so every Quote
> request takes at least one second, however quickly the host answers.
>
> With a local Quote Generation Service the VMM completes the request in
> a few milliseconds. On an Emerald Rapids host (KVM, QEMU 11.1, Intel
> QGS), back-to-back Quote requests through configfs-tsm took 1021-1024 ms
> each; with this change they take 14-21 ms (median 16 ms) at HZ=250.
> Since quote_lock serializes requests, the one-second floor also caps a
> TD at about one Quote per second, which hurts users that bind a fresh
> Quote to every connection, such as attested TLS.
>
> Recheck the status every 10 ms instead. msleep_interruptible() rounds
> up to whole jiffies and adds one, so at HZ=250 a step takes 16 ms. The
> sleep stays interruptible, and the timeout becomes a deadline in
> jiffies.
>
> Suggested-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
> Signed-off-by: Moe Mahhouk <moe@flashbots.net>
Reviewed-by: Kiryl Shutsemau (Meta) <kas@kernel.org>
--
Kiryl Shutsemau / Kirill A. Shutemov
next prev parent reply other threads:[~2026-12-04 23:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 14:11 [PATCH v4 0/2] virt: tdx-guest: Fix and speed up the wait for a Quote Moe Mahhouk
2026-11-25 14:11 ` Moe Mahhouk via B4 Relay
2026-11-25 14:11 ` [PATCH v4 1/2] virt: tdx-guest: Fix timeout detection in wait_for_quote_completion() Moe Mahhouk
2026-11-25 14:11 ` Moe Mahhouk via B4 Relay
2026-11-25 14:11 ` [PATCH v4 2/2] virt: tdx-guest: Poll Quote status every 10 ms Moe Mahhouk
2026-11-25 14:11 ` Moe Mahhouk via B4 Relay
2026-12-04 23:43 ` Kiryl Shutsemau (Meta) [this message]
2026-11-25 21:42 ` [PATCH v4 0/2] virt: tdx-guest: Fix and speed up the wait for a Quote Edgecombe, Rick P
2026-11-26 1:48 ` Xiaoyao Li
2026-11-26 12:46 ` [🚨ext] " Moe Mahhouk
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=axNQHWNIVO4Xe8Eh@shutemov.name \
--to=kas@kernel.org \
--cc=dave.hansen@linux.intel.com \
--cc=djbw@kernel.org \
--cc=erdemaktas@google.com \
--cc=jun.miao@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-coco@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=moe@flashbots.net \
--cc=rick.p.edgecombe@intel.com \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=thomas.lendacky@amd.com \
--cc=x86@kernel.org \
--cc=xiaoyao.li@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.