Page MenuHomeFreeBSD

x86: tsc: punish VirtualBox with low priority for TSC
ClosedPublic

Authored by kevans on Mar 8 2021, 7:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 27, 4:12 PM
Unknown Object (File)
Sun, Oct 27, 4:11 PM
Unknown Object (File)
Sun, Oct 27, 4:11 PM
Unknown Object (File)
Oct 4 2024, 12:44 PM
Unknown Object (File)
Oct 3 2024, 9:43 AM
Unknown Object (File)
Oct 2 2024, 6:18 PM
Unknown Object (File)
Oct 2 2024, 5:19 PM
Unknown Object (File)
Oct 2 2024, 3:42 AM
Subscribers

Details

Summary

Misbehavior has been observed with TSC under VirtualBox, where threads
doing small sleeps (~1 second) may miss their wake up and hang around
in a sleep state indefinitely. Switching back to ACPI-fast decidedly
fixes it, so stop using TSC on VirtualBox at least for the time being.

This partially reverts 84eaf2ccc6aa, applying it only to VirtualBox.

MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kevans requested review of this revision.Mar 8 2021, 7:46 PM

From what I understand in the timecounter selection logic, tc with negative tc_quality can be selected with sysctl, but not by newly added tunable. If yes, it might make sense to set quality to zero, not a negative.

This revision is now accepted and ready to land.Mar 8 2021, 8:05 PM

LGTM with or without @kib's suggestion

In D29132#652389, @kib wrote:

From what I understand in the timecounter selection logic, tc with negative tc_quality can be selected with sysctl, but not by newly added tunable. If yes, it might make sense to set quality to zero, not a negative.

Right, that looks correct to me as well. I don't see any reason we should ignore this if it's specified in the new tunable, and if we really don't have any with a quality higher than 0 then we do have a functional system with accurate enough timekeeping to keep ntpd happy. I'll switch it to 0 pre-commit.

This revision was automatically updated to reflect the committed changes.