On Mon, 8 Mar 2021 at 12:07, Kyle Evans <kevans_at_freebsd.org> wrote: > > diff --git a/sys/x86/x86/tsc.c b/sys/x86/x86/tsc.c > index 68fc57e6ea7..6f25360a67c 100644 > --- a/sys/x86/x86/tsc.c > +++ b/sys/x86/x86/tsc.c > _at__at_ -501,7 +501,12 _at__at_ test_tsc(int adj_max_count) > uint64_t *data, *tsc; > u_int i, size, adj; > > - if ((!smp_tsc && !tsc_is_invariant) || vm_guest) > + /* > + * Misbehavior of TSC under VirtualBox has been observed. In > + * particular, threads doing small (~1 second) sleeps may miss their > + * wakeup and hang around in sleep state, causing hangs on shutdown. > + */ > + if ((!smp_tsc && !tsc_is_invariant) || vm_guest == VM_GUEST_VBOX) > return (-100); > size = (mp_maxid + 1) * 3; > data = malloc(sizeof(*data) * size * N, M_TEMP, M_WAITOK); This seems like a sensible change to me. To make it explicilty clear what the comment/workaround applies to, maybe rewrite it as: if (!smp_tsc && !tsc_is_invariant) return (-100); /* * Misbehavior of TSC under VirtualBox has been observed. In * particular, threads doing small (~1 second) sleeps may miss their * wakeup and hang around in sleep state, causing hangs on shutdown. */ if (vm_guest == VM_GUEST_VBOX) return (-100);Received on Mon Mar 08 2021 - 18:31:43 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:27 UTC