From owner-freebsd-current@freebsd.org Wed Jan 20 18:05:10 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 1F1314FDA6B for ; Wed, 20 Jan 2021 18:05:10 +0000 (UTC) (envelope-from rhurlin@gwdg.de) Received: from gmailer.gwdg.de (gmailer.gwdg.de [134.76.11.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DLYMn1JNzz3PD7 for ; Wed, 20 Jan 2021 18:05:08 +0000 (UTC) (envelope-from rhurlin@gwdg.de) Received: from excmbx-03.um.gwdg.de ([134.76.9.218] helo=email.gwdg.de) by mailer.gwdg.de with esmtp (GWDG Mailer) (envelope-from ) id 1l2Hqt-00070N-3x; Wed, 20 Jan 2021 19:05:07 +0100 Received: from krabat.raven.hur (10.250.9.200) by EXCMBX-03.um.gwdg.de (134.76.9.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2044.4; Wed, 20 Jan 2021 19:05:06 +0100 Subject: Re: Waiting for bufdaemon From: Rainer Hurling To: Konstantin Belousov CC: freebsd-current Reply-To: References: <1d675d77-8bdb-c285-ffa2-28330b839734@alvermark.net> <60599f75-7206-9269-ac0c-934f8f31ae26@gwdg.de> <3885bc2a-3924-cc3f-6cad-99dc6f803b0d@gwdg.de> Message-ID: <49e151f1-499e-9181-fde0-31591bc1a4eb@gwdg.de> Date: Wed, 20 Jan 2021 19:05:00 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.250.9.200] X-ClientProxiedBy: excmbx-21.um.gwdg.de (134.76.9.231) To EXCMBX-03.um.gwdg.de (134.76.9.218) X-Virus-Scanned: (clean) by clamav X-Rspamd-Queue-Id: 4DLYMn1JNzz3PD7 X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.50 / 15.00]; HAS_REPLYTO(0.00)[rhurlin@FreeBSD.org]; HAS_XOIP(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:134.76.10.0/23]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_MED(-0.20)[134.76.11.17:from]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:680, ipnet:134.76.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FREEFALL_USER(0.00)[rhurlin]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; DMARC_NA(0.00)[gwdg.de]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[134.76.11.17:from]; MAILMAN_DEST(0.00)[freebsd-current] 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: Wed, 20 Jan 2021 18:05:10 -0000 Am 20.01.21 um 15:36 schrieb Rainer Hurling: > Am 20.01.21 um 14:52 schrieb Konstantin Belousov: >> On Wed, Jan 20, 2021 at 02:35:59PM +0100, Rainer Hurling wrote: >>> Am 20.01.21 um 14:12 schrieb Konstantin Belousov: >>>> On Wed, Jan 20, 2021 at 01:56:57PM +0100, Rainer Hurling wrote: >>>>> Am 20.01.21 um 13:34 schrieb Konstantin Belousov: >>>>>> On Wed, Jan 20, 2021 at 01:17:51PM +0100, Rainer Hurling wrote: >>>>>>> Am 20.01.21 um 11:18 schrieb Konstantin Belousov: >>>>>>>> On Wed, Jan 20, 2021 at 11:02:21AM +0100, Jakob Alvermark wrote: >>>>>>>>> This patch hides the problem for me. The system seems to work better now. >>>>>>>>> >>>>>>>>> No waiting on reboot, and the webcam works better. >>>>>>>> I am curious what do you mean by the above reference to webcam. >>>>>>>> Can you explain it with more details, even if only the impressions? >>>>>>> >>>>>>> I should mention, that beside the already discussed timing problem with >>>>>>> bufdaemon, I also have problems with several apps: >>>>>>> >>>>>>> >>>>>>> After a high system load, several programs only react very slowly (e.g. >>>>>>> Firefox). Several dockable apps from WindowMaker, but also e.g. conky do >>>>>>> not update their windows anymore, they freeze. After some time, Firefox >>>>>>> updates its screen content only after switching back from another window ... >>>>>>> >>>>>>> When such frozen programs are killed and restarted, they run normally >>>>>>> again for an indefinite time before they freeze again. >>>>>>> >>>>>>> These symptoms completely disappeared, after I patched the Ryzen box as >>>>>>> suggested on 01/17: >>>>>> >>>>>> Do you load latest microcode update from devcpu-data? >>>>> >>>>> Yes, sysutils/devcpu-data is installed and the following to lines are in >>>>> /boot/loader.conf >>>>> >>>>> cpu_microcode_load="YES" >>>>> cpu_microcode_name="/boot/firmware/intel-ucode.bin" >>>>> >>>>> But isn't this just for Intel (i387 and amd64), not AMD cpus? >>>> You need microcode_update_enable="YES" in /etc/rc.conf for late microcode >>>> update. >>>> >>>> I think that early boot update should work on AMD, bit for this you need to >>>> select and put right blob. It is enough to load late to answer my question. >>> >>> Ah, ok. Thanks for clarification. I also put cpu_microcode_load="YES" in >>> /etc/rc.conf for a late update. >>> >>> Should I try again without your patch of sys/x86/tsc.c, whether the >>> problem still occurs? > > Unfornately, without the patch from 01/17 the problem is _not_ solved. > > Next I will try your patch from today, f lib/libc/x86/sys/__vdso_gettc.c > an lib/libc/x86/sys/__vdso_gettc.c ... I can confirm that this patch also works for me on Ryzen 3950X. No more bufdaemon waitings, no frozen apps, ... > > >> Yes. >> >>> >>> >>> And for the early boot update, how do I know about the right blob? >> I am not aware of the mechanism. My best suggestion is that you match >> the blob against your CPU family/model id manually. >> >>> >>>> >>>>> >>>>>> It might be not enough, which means that additionally latest BIOS needs >>>>>> to be flushed. >>>>>> >>>>> >>>>> I am running latest Firmware F31 on a "Gigabyte\ Aorus\ X570\ Elite" >>>>> mainboard.