From owner-freebsd-current@freebsd.org Sun Mar 7 20:25:57 2021 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0964B572224 for ; Sun, 7 Mar 2021 20:25:57 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DttK06lWKz3kpY for ; Sun, 7 Mar 2021 20:25:56 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id D5D6A225F for ; Sun, 7 Mar 2021 20:25:56 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f47.google.com with SMTP id cw15so3666756qvb.11 for ; Sun, 07 Mar 2021 12:25:56 -0800 (PST) X-Gm-Message-State: AOAM530Sl0FLEpmQHSnp0x6BIDx0bXo41Bu50u4Lg2NsLCv8qxCbXfcO gQszSdNwGYMd1ZEyGJw6NyxegNBmrdcvyWULk4U= X-Google-Smtp-Source: ABdhPJzKgyAW09AuY1jCf/qVlYeJNSUWPOtUiudaz14iwwfygsY8RaKAeGBZeTCDVV/xfJJcaLjXNIO4pK9nsnNezEQ= X-Received: by 2002:a0c:fd27:: with SMTP id i7mr18506192qvs.22.1615148756349; Sun, 07 Mar 2021 12:25:56 -0800 (PST) MIME-Version: 1.0 References: <20210305.160311.867123118349124334.yasu@utahime.org> <20210306.083323.1112779300812727243.yasu@utahime.org> <20210306005643.45feb56d@bsd64.grem.de> <8a549830a3087998c1e2f80a5fb58199@bsdforge.com> <20210306.185955.1096959917131550098.yasu@utahime.org> In-Reply-To: <20210306.185955.1096959917131550098.yasu@utahime.org> From: Kyle Evans Date: Sun, 7 Mar 2021 14:25:45 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Waiting for bufdaemon To: Yasuhiro Kimura Cc: FreeBSD Current Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2021 20:25:57 -0000 On Sat, Mar 6, 2021 at 4:02 AM Yasuhiro Kimura wrote: > > From: Yasuhiro Kimura > Subject: Re: Waiting for bufdaemon > Date: Sat, 06 Mar 2021 08:33:23 +0900 (JST) > > >> My belief is that this commit helps more users than it hurts. Namely, > >> the VMWare and KVM users, which are majority, use fast timecounter, > >> comparing to the more niche hypervisors like VirtualBox. > >> > >> For you, a simple but manual workaround, setting the timecounter to > >> ACPI (?) or might be HPET, with a loader tunable, should do it. > > > > Then please let me know the name of it. > > From: Michael Gmelin > Subject: Re: Waiting for bufdaemon > Date: Sat, 6 Mar 2021 00:56:43 +0100 > > > see `man 4 timecounters': > > > > https://www.freebsd.org/cgi/man.cgi?query=timecounters > > From: Mark Millard via freebsd-current > Subject: Re: Waiting for bufdaemon > Date: Fri, 5 Mar 2021 17:35:14 -0800 > > > Its somewhat messy but there is a technique of using > > the "timecounter" in kib's wording to explore: > ... > > From: Chris > Subject: Re: Waiting for bufdaemon > Date: Fri, 05 Mar 2021 18:54:05 -0800 > > > Not exactly what you're asking for. But sysctl sysctl(3) and loader(8) > > will provide some good clues. > > Thank you for reply. > > On the system in question 'kern.timecounter.choice' and > 'kern.timecounter.hardware' tunables have following values. > > ---------------------------------------------------------------------- > yasu@rolling-vm-freebsd1[1002]% sysctl kern.timecounter.choice > kern.timecounter.choice: ACPI-fast(900) i8254(0) TSC-low(-100) dummy(-1000000) > yasu@rolling-vm-freebsd1[1003]% sysctl kern.timecounter.hardware > kern.timecounter.hardware: ACPI-fast > yasu@rolling-vm-freebsd1[1004]% > ---------------------------------------------------------------------- > > So I tried setting the latter to 'i8254', 'TSC-low' and 'dummy', and > checked if the problem disappear. But unfortunately it still happened. > On the contrary changing the value from default made thing worse. > If it is set to either 'i8254' or 'TSC-low', timeout of bufdaemon also > happens when I shutdown the system just after bootstrap is completed. > And if it is set to 'dummy', the sytem hung up in the middle of > bootstrap. > > So setting 'kern.timecounter.hardware' tunable doesn't work in my > case. Then is there any way to try? I'm going to be pedantic here, but note that this isn't a tunable. You cannot, AFAIK, influence the timecounter chosen with kenv; it has to be set post-boot via sysctl, and if you're really unlucky it could be that bufdaemon wedges before you manage to change it (though it seems unlikely). I've had some success with setting it to ACPI-fast in sysctl.conf here.