Page MenuHomeFreeBSD

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

Authored by kevans on Mar 8 2021, 7:46 PM.

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
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; 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.