ACK/Cmnt: [SRU][J/L][PATCH 0/1] Xen timekeeping performance improvement
Stefan Bader
stefan.bader at canonical.com
Mon Aug 28 09:57:31 UTC 2023
On 26.08.23 02:57, Krister Johansen wrote:
> Dear Ubuntu Kernel Team:
>
> This patch modifies which default clocksource is selected on Xen.
> Users, especially those on EC2, are encouraged to select tsc as their
> default clocksource. However, this requires manual tuning of the
> operating system. Kvm can determine if it safe to use the tsc, and will
> default to that instead of its pvclock when appropriate. This patch
> does the same for Xen instances.
>
> If appropriate, it's fine if this is applied to only the linux-aws
> branches.
>
> Not all Xen EC2 instances advertise explicit nomigrate support, however,
> on those that do we'll select tsc by default. On the subset of hosts
> where this is advertised, users will safely default to the more
> performant clocksource.
>
> [Impact]
> Xen instances default to the xen clocksource which has been documented
> to be slower. This is required for instances where the tsc is not safe
> to use, or the guest is subject to migration. On some platforms the
> performance impact can be high, and users are encouraged to select the
> tsc when appropriate. Instead of leaving up to users to figure this out
> by reading a variety of different documents, pick the fast clocksource
> when it can be determined to be safe to do so.
>
> [Backport]
> Clean cherry pick. No conflicts applying to 5.15 or 6.2.
>
> [Test]
> Booted EC2 xen instances with and without this patch and validated that
> on those that properly advertised the required criteria via cpuid, that
> the clocksource defaulted to tsc instead of xen.
>
> [Potential Regression]
> Potential is low, since only absurd configurations could lead to a
> problem. If this is considered risky, it can be applied to only
> linux-aws where the documented guidance is for users to enable tsc as
> the clocksource on Xen.
>
> Krister Johansen (1):
> x86/xen/time: prefer tsc as clocksource when it is invariant
>
> arch/x86/xen/time.c | 38 +++++++++++++++++++++++++++++++++++++-
> 1 file changed, 37 insertions(+), 1 deletion(-)
>
The change is limited to the Xen environment, looks straight forward
enough, is upstream (as of v6.3), and can be validated (also fixes an
issue). So it sounds reasonable to put it into the general distro kernel.
Acked-by: Stefan Bader <stefan.bader at canonical.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xE8675DEECBEECEA3.asc
Type: application/pgp-keys
Size: 44613 bytes
Desc: OpenPGP public key
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20230828/2453f7a9/attachment-0001.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20230828/2453f7a9/attachment-0001.sig>
More information about the kernel-team
mailing list