Request backport of xen timekeeping performance improvements
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Medium
|
Krister Johansen | ||
Lunar |
Fix Released
|
Medium
|
Krister Johansen |
Bug Description
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 requests a backport of 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.
Changed in linux (Ubuntu): | |
status: | Confirmed → Invalid |
Changed in linux (Ubuntu Jammy): | |
status: | New → Fix Committed |
Changed in linux (Ubuntu Lunar): | |
status: | New → Fix Committed |
Changed in linux (Ubuntu Jammy): | |
importance: | Undecided → Medium |
Changed in linux (Ubuntu Lunar): | |
importance: | Undecided → Medium |
Changed in linux (Ubuntu Jammy): | |
assignee: | nobody → Krister Johansen (kmjohansen) |
Changed in linux (Ubuntu Lunar): | |
assignee: | nobody → Krister Johansen (kmjohansen) |
tags: |
added: verification-done-jammy-linux-aws removed: verification-needed-jammy-linux-aws |
I'll follow-up via e-mail with the ubuntu kernel team mailing list with a patch that I've already prepared for the backport.