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)
Feb 11 2024, 3:27 AM
Unknown Object (File)
Dec 20 2023, 7:12 AM
Unknown Object (File)
Dec 15 2023, 10:12 AM
Unknown Object (File)
Dec 12 2023, 1:34 PM
Unknown Object (File)
Nov 13 2023, 1:49 PM
Unknown Object (File)
Oct 25 2023, 2:10 PM
Unknown Object (File)
Oct 20 2023, 11:23 AM
Unknown Object (File)
Sep 25 2023, 2:22 PM
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.