From owner-freebsd-amd64@freebsd.org Tue Jun 19 05:44:46 2018 Return-Path: Delivered-To: freebsd-amd64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B05A1021A8C for ; Tue, 19 Jun 2018 05:44:46 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 6DB026C130 for ; Tue, 19 Jun 2018 05:44:45 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mailman.ysv.freebsd.org (Postfix) id 297F61021A87; Tue, 19 Jun 2018 05:44:45 +0000 (UTC) Delivered-To: amd64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16DF41021A85 for ; Tue, 19 Jun 2018 05:44:45 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x236.google.com (mail-yw0-x236.google.com [IPv6:2607:f8b0:4002:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 960086C12F for ; Tue, 19 Jun 2018 05:44:44 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x236.google.com with SMTP id t198-v6so6476949ywc.3 for ; Mon, 18 Jun 2018 22:44:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/Gu8mj7iAvWYJXrPQpMy6WE4jBtcm6EQAcCR74dWm2s=; b=F+3kUyu/DZqiZbPWzYgc4aD/ZPEpMUIM1mdmQQm0p07zdmqdVlppbIadM0c02ViVZb fkA0CJgahHk3b3CLZa0CrUBN9E5RXckjrt3DTaV8Kyqae6QoI83lLIBy7mwmPWWVmW57 /cCQukhVRq5/N48xGS5fdiQFUOjteU2pC145s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/Gu8mj7iAvWYJXrPQpMy6WE4jBtcm6EQAcCR74dWm2s=; b=hLzguhZ1UGmpQrJ79fUtmTNNBC/1iF7P7/2PmbNDa0J5Lkpd+YuFjjEfgtYnASf5cp g/CqbzKME2Vw+b7u5FjxWYvBpjz9bS62evNCyNHxbj/YHnTLrEBnr7OS27ICOEXkGa3+ J14qRjiyICxzonPBWe07S5XOgJUXBQW7yx7erx7d97I02VyfgYktkXCSz1t/Eossa61I PfMrNeJXPcgUFLys/MafOSHO3C+i+qBRqcQAaO3olKQokxzfJnJcosX9m0mAliAadHYE RPq6dZQuyqeCKKSIJcopQacWFfGkWOI0RmBn3cckV4A/bEsick3UqG9rZBdLaDI94B/X g2ww== X-Gm-Message-State: APt69E0uDt+kuNwDgcPN1FmUoAoVL2kS2dCnOaiC9VssipasDWJ8ffyI zc+rmSrFmW2dWdlypmAeuYkzNHO4rDZdesLjBONXCg== X-Google-Smtp-Source: ADUXVKKOMXYLTREOh+SBFA/+DBVleJHqabFYFrfch5h1YgSiVacooM/pwgNDGRp2ZRcMsFRr8D4Co6Ide5YLwWRVMRc= X-Received: by 2002:a0d:cf01:: with SMTP id r1-v6mr7164640ywd.162.1529387083966; Mon, 18 Jun 2018 22:44:43 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:ef50:0:0:0:0:0 with HTTP; Mon, 18 Jun 2018 22:44:13 -0700 (PDT) In-Reply-To: References: <20180613103535.GP2493@kib.kiev.ua> From: Eitan Adler Date: Mon, 18 Jun 2018 22:44:13 -0700 Message-ID: Subject: Re: Ryzen public erratas To: Konstantin Belousov Cc: "current@freebsd.org" , amd64@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2018 05:44:46 -0000 On 13 June 2018 at 04:16, Eitan Adler wrote: > On 13 June 2018 at 03:35, Konstantin Belousov wrote: >> Today I noted that AMD published the public errata document for Ryzens, >> https://developer.amd.com/wp-content/resources/55449_1.12.pdf >> >> Some of the issues listed there looks quite relevant to the potential >> hangs that some people still experience with the machines. I wrote >> a script which should apply the recommended workarounds to the erratas >> that I find interesting. >> >> To run it, kldload cpuctl, then apply the latest firmware update to your >> CPU, then run the following shell script. Comments indicate the errata >> number for the workarounds. >> >> Please report the results. If the script helps, I will code the kernel >> change to apply the workarounds. >> >> #!/bin/sh >> >> # Enable workarounds for erratas listed in >> # https://developer.amd.com/wp-content/resources/55449_1.12.pdf >> >> # 1057, 1109 >> sysctl machdep.idle_mwait=0 >> sysctl machdep.idle=hlt > > > Is this needed if it was previously machdep.idle: acpi ? This might explain why I've never seen the lockup issues mentioned by other people. What would cause my machine to differ from others? -- Eitan Adler