Re: Waiting for bufdaemon

From: Yasuhiro Kimura <yasu_at_utahime.org>
Date: Tue, 09 Mar 2021 15:37:44 +0900 (JST)
From: Kyle Evans <kevans_at_freebsd.org>
Subject: Re: Waiting for bufdaemon
Date: Mon, 8 Mar 2021 11:07:23 -0600

> I've tried tracking down exactly what the problem is that causes the
> symptoms we're seeing, but no luck so far. I'm eyeballing the
> following patch which partially reverts kib's 84eaf2ccc6aa05 ("x86:
> stop punishing VMs with low priority for TSC timecounter") and only
> punishes VirtualBox guests.
> 
> 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);

After updating to 6ffdaa5f2d4, I confirmed timeout of bufdaemon
dosen't happen even if I don't set kern.timecounter.hardware at all in
loader.conf.

Thank you for fixing the problem.

---
Yasuhiro Kimura
Received on Tue Mar 09 2021 - 05:38:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:27 UTC