From owner-freebsd-current@freebsd.org Tue Jun 26 14:05:56 2018 Return-Path: Delivered-To: freebsd-current@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 03FBE102827E for ; Tue, 26 Jun 2018 14:05:56 +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 856B971BE8 for ; Tue, 26 Jun 2018 14:05:55 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mailman.ysv.freebsd.org (Postfix) id 3BEA6102827C; Tue, 26 Jun 2018 14:05:55 +0000 (UTC) Delivered-To: current@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 17BF9102827B for ; Tue, 26 Jun 2018 14:05:55 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yb0-x233.google.com (mail-yb0-x233.google.com [IPv6:2607:f8b0:4002:c09::233]) (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 7C45D71BE4 for ; Tue, 26 Jun 2018 14:05:54 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x233.google.com with SMTP id g3-v6so4639445ybf.10 for ; Tue, 26 Jun 2018 07:05:54 -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=eYKqmEkmoBxq3pm+Ib5BL/dZlc4sFTleeNRmSVkGVZY=; b=PItTpa99gjDOeDCEWRYbzluU/YrrPurVSqjgbx/KbWFVP6kYxI63K0jA50dpksAXrl l+aSRvJIc8rApKVKJJqBIcHh0P4wlwl/2Fq9kCQ7XZJPUmdCm8KKZWf2JGxS+N2ZeP8r bnHrHz1gFHbPR3WnsYMLt4oqwSlVAY5QlzxzM= 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=eYKqmEkmoBxq3pm+Ib5BL/dZlc4sFTleeNRmSVkGVZY=; b=OILk/+VJ8s1BOjOaF/IOrB3mcEsooWkE/tNhyVlgB1yypmC0/PiFgd1W68U0g9FVkV bAcwRX38286ssf/NRyNd7q0qjDen0AYvG716yGnUHXBFyfv4p71jwjo47PUINWJuNF6y ej63kZU12pv4ZqD5NOJEjy3XTpmmJa3iGmYGZwKKoMZlsaAaYCZDrkeBcvy6uWM8PWbS ZAFJfO7eazm4aBzNLJvCOtAvkigOVMe+4noQdJmTzCYgcehlpewNe0UCrfJv2nciXP2/ asOG8E+0nt6FVXzXody+vHvML6dCqnT07i+06Z3PHPWM4kyAwNElkaTGi9h0BolS0xmV 8MQA== X-Gm-Message-State: APt69E05+QWmqQlNUXbBTS07/ApOdviJ+JaMDkVvIps5lsUBvn33zLwf kPC+H9/dQDV9eiwKj7+Fq127Bi/GW4566MkM7zxMsdoQ X-Google-Smtp-Source: ADUXVKLJDTHWHNzHS358kqLEH1sQZLz5HKR2LwCEa17mEqUlXajS4cMdR3x9UeCQpT+KtPsG1speXFIOLg86sEo9kOU= X-Received: by 2002:a25:8542:: with SMTP id f2-v6mr852228ybn.87.1530021953563; Tue, 26 Jun 2018 07:05:53 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:ef50:0:0:0:0:0 with HTTP; Tue, 26 Jun 2018 07:05:22 -0700 (PDT) In-Reply-To: <20180619115030.5491af33@ernst.home> References: <20180613103535.GP2493@kib.kiev.ua> <20180619115030.5491af33@ernst.home> From: Eitan Adler Date: Tue, 26 Jun 2018 07:05:22 -0700 Message-ID: Subject: Re: Ryzen public erratas To: Gary Jennejohn Cc: Konstantin Belousov , amd64@freebsd.org, "current@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.26 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: Tue, 26 Jun 2018 14:05:56 -0000 On 19 June 2018 at 02:50, Gary Jennejohn wrote: > On Mon, 18 Jun 2018 22:44:13 -0700 > Eitan Adler wrote: > >> 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? >> > > I had sysctl machdep.idle_mwait=1 and machdep.idle=acpi before > applying the shell script. I had multiple lockups every week, > sometimes multiple lockups per day. This makes me curious about why I didn't experience lockups. Perhaps my BIOS defaulted to something else? With these settings: machdep.idle: acpi machdep.idle_mwait: 1 -- Eitan Adler