From owner-freebsd-current@freebsd.org Tue Jun 19 09:50:39 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 C0CF8100B8A3 for ; Tue, 19 Jun 2018 09:50:38 +0000 (UTC) (envelope-from gljennjohn@gmail.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 5465E76C7B for ; Tue, 19 Jun 2018 09:50:38 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 13920100B89D; Tue, 19 Jun 2018 09:50:38 +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 CABBA100B899; Tue, 19 Jun 2018 09:50:37 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mail-wr0-x235.google.com (mail-wr0-x235.google.com [IPv6:2a00:1450:400c:c0c::235]) (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 43B3476C72; Tue, 19 Jun 2018 09:50:37 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mail-wr0-x235.google.com with SMTP id k16-v6so19853487wro.0; Tue, 19 Jun 2018 02:50:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=0Wp5VQsuPD7xbwaRE3E/GHIynVmYv6qJosAEgIvbcDY=; b=ADMhe9e/7BDZHBiWI2My4cG8Vx3Ya/nMCyaSzmWlJgesDDHUFmImqpxo01RXg1VN5t cp//KruysAIzRi7iveb+9wv6s717YQ+oO9nL4XOX55lTv2YEfxcUm0IrMo8M3dDwqEVH 2PZ4YbswgxD7y2zZaYjE62isxiE7jFn/s3c1RLnrrXu8D4y4OV79qh8Xea7dAKJU0khp inzuBdbXnFC78bPwPUjZu3AsU3Lhbvp8HkSvbTHuvtWYMLfOuYy5Q1yoHpMfZkZdBQe1 1GSBYp/zD9A4QxImVkRtPeenuplGsJ38x4xv4rUbyReIheezE+LhkvDFh//qVyMdbQI/ Q9fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=0Wp5VQsuPD7xbwaRE3E/GHIynVmYv6qJosAEgIvbcDY=; b=F0Svl5GFQLh6fV/FxUVuKwWApEFvjVCY+N+LHSmUN82txVqEXfh7X2XiQOrKsF+3Wl 2+1x0EZBn+6t4fLaKJzoPkwYfwJ+ji55Q4bcskW+UFrFRktfbwqfBvtzNLsKjhMuwZp+ qWUoaM4ptfQn2ZehfRUfG+BaU4BHkBdi7wt/V1fZTKn9ykuVhH8VepMp5KCFeoJcKIIL 8OMU5bvMCht/byrKdQyrTzyMuHsyzTDGsVVvclvx0tMNhWuSncrYPnDlQKrLM6nRc5Aa GtAnbLMy3KVEyQHHJSY8stwXNGcgvBUp+VJ9eRZHj9qaZY0sp+K47kYTF/rTMS9G0rMQ WeTQ== X-Gm-Message-State: APt69E3YCKVhlMfIae+2PDDjJqEi+OZY7l5VExTRpgJ2RBNmpKbNrFRl WK15y/9aksks4sf/aabuEnvmSw== X-Google-Smtp-Source: ADUXVKJubZ0H6mPZH4uzjeW7DGvNVedZfkJHoVgDeTlMu32MmCW2MViAS3EPT+s1riXxSjoSRfiu+w== X-Received: by 2002:a5d:4049:: with SMTP id w9-v6mr13829408wrp.96.1529401836319; Tue, 19 Jun 2018 02:50:36 -0700 (PDT) Received: from ernst.home (p5B02381D.dip0.t-ipconnect.de. [91.2.56.29]) by smtp.gmail.com with ESMTPSA id b80-v6sm11902855wmf.2.2018.06.19.02.50.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Jun 2018 02:50:35 -0700 (PDT) Date: Tue, 19 Jun 2018 11:50:30 +0200 From: Gary Jennejohn To: Eitan Adler Cc: Konstantin Belousov , amd64@freebsd.org, "current@freebsd.org" Subject: Re: Ryzen public erratas Message-ID: <20180619115030.5491af33@ernst.home> In-Reply-To: References: <20180613103535.GP2493@kib.kiev.ua> Reply-To: gljennjohn@gmail.com X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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, 19 Jun 2018 09:50:39 -0000 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. With the idle settings from the script it still locks up, but not as often. I suspect I also need to update the CPU firmware, although I expect that the new BIOS version I installed last week would have done that already. -- Gary Jennejohn