From owner-freebsd-hackers@freebsd.org Mon Aug 27 15:07:30 2018 Return-Path: Delivered-To: freebsd-hackers@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 D9E44108D32D; Mon, 27 Aug 2018 15:07:29 +0000 (UTC) (envelope-from meowthink@gmail.com) Received: from mail-oi0-x22c.google.com (mail-oi0-x22c.google.com [IPv6:2607:f8b0:4003:c06::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6A4C374ABD; Mon, 27 Aug 2018 15:07:29 +0000 (UTC) (envelope-from meowthink@gmail.com) Received: by mail-oi0-x22c.google.com with SMTP id m11-v6so27879763oic.2; Mon, 27 Aug 2018 08:07:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ppoamd3JBEGM1cHjn7e6F/AhHW1rzyopnaokDm1OZdo=; b=ICBGAR9g/s4IIz4QqLLgJaagulC2N3GcsYoicCeTkXMAypMAcLStN7NJ3qciiTZUnI boxJYu16zTuLUvVBcb3MEl3HUL28UKx6/3gXlLy32REqGfbCpg57kadsOI1jEBl+zMPI lm/75aK5J1WE0G3eSVkosfmHP+YKXtoj47UG3AZ/TB7jz43m1B54jzDIkRzj5fl0wEi9 8JYouPT1a3g6WVlGRjZVjLUTareLcx60J31S+xhibx5jOLaLvCb5mc7hx3Rk3+ohrcqn Buk+mJ/Hp4wwhovJW+z9wWDOB1W1w+x97zP5cIl3XbTdnDe5jJXYm2WJXGLbh5maYdq2 5GAw== 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=ppoamd3JBEGM1cHjn7e6F/AhHW1rzyopnaokDm1OZdo=; b=CoC7be+6BbzQThz1EbBz1+/RV3vHgxpYTRTtfHZs7FypL1WHPju5AfGmOz1nR893Rf VA/zNfdiNJTmqBTD0CQoQLT6UtI7Xr0q2YFGdeWSs9wh7tYbQvpTF1Xb3Qm8vg0URMid SRTEYePoRavPV5z/jYkhx5ElRWnh4DbHV9S/wIFbaa60HyQ1fRihvPVlRoejFhEE+ZeF VI0d6rYXnNk5c0Ral16pdDXOG+poRS/EGeJWNUvP1pjm521DoTQhpv+eGNHz1LkQ9RC1 oZJ244rfSh3VCleIAKr9cxluNoc0A0+Tw+XY8FZ7s4V8C8wHKpyrrk4p/Ls2CsuvLvTT 8EtQ== X-Gm-Message-State: APzg51CoQXf4vx2AlJDVT1QZXb6idpMBK6f7xqRnLIp+dkH7FME0q3Ip BVbxpK0dsR4xfkVzx8JP97qkKbC8j8lOWf879gI= X-Google-Smtp-Source: ANB0VdYnKXI4HHN+ZR+WnHE8cuYAHDyzEJlwbN0xfNW62c6A9HSecBKcaiD7r4qq41IRfmMncXKQyKPBdLIfInB/ORU= X-Received: by 2002:aca:4802:: with SMTP id v2-v6mr13339208oia.259.1535382448704; Mon, 27 Aug 2018 08:07:28 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a8a:a54:0:0:0:0:0 with HTTP; Mon, 27 Aug 2018 08:07:28 -0700 (PDT) In-Reply-To: References: <20180827132905.191dbd8c@ernst.home> From: Meowthink Date: Mon, 27 Aug 2018 23:07:28 +0800 Message-ID: Subject: Re: Help diagnose my Ryzen build problem To: "karu.pruun" Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2018 15:07:30 -0000 Hi peeter, On 8/27/18, karu.pruun wrote: > On Mon, Aug 27, 2018 at 3:21 PM Meowthink wrote: >> That's kib, who has committed things in that script to both 12 [1] and >> stable/11 [2]. >> >> Unfortunately, that's for Ryzens family 17h model 00h-0fh, whereas my >> Ryzen 5 2400G's model is 11h. >> >> On the microcode. It shall be updated through UEFI/BIOS updates. I >> think mine is now PinnaclePI-AM4_1.0.0.4 with microcode patchlevel >> 0x810100b. >> >> Seems like ... the only thing I can do is sit down and wait? > > The revision > > https://svnweb.freebsd.org/base/head/sys/x86/x86/cpu_machdep.c?r1=336763&r2=336762&pathrev=336763 > > works around the mwait issue, i.e. it sets > > sysctl machdep.idle_mwait=0 > sysctl machdep.idle=hlt > I think that shall not apply to 2400G, which is model 11h not 1h. Here're what I have now: machdep.idle: acpi machdep.idle_available: spin, mwait, hlt, acpi machdep.idle_apl31: 0 machdep.idle_mwait: 1 > Now it may or may not relate to your problem, but it appears that > Ryzen 2400G also has another issue with HLT, see the DragonFly bug > report > > https://bugs.dragonflybsd.org/issues/3131 > Thanks a lot for that info. It's much easier to prove your problem, since it's reproducible. But mine was so random to catch... Anyway, it seems like the IRET issue [1] is still not fixed? I'm highly doubt that my issue is this related because my system became significantly more stable since I stop that irq storm from bluetooth module - Though it still panics occasionally. So could anybody tell, what's the difference between FreeBSD workaround [2] and the DragonflyBSD one? > which AMD is aware of and is possibly working on, but it may not have > appeared in the errata yet. The bug report says that until this is > fixed, the workaround is to also disable HLT in cpu_idle. I am not > sure what is the correct value for the sysctl on FreeBSD, perhaps > > sysctl machdep.idle=0 > > or some other value? In the meantime, I have this microcode # cpucontrol -m 0x8b /dev/cpuctl0 MSR 0x8b: 0x00000000 0x0810100b Hence I should use mwait? Still don't know what should I set. Any idea? > > Cheers > > Peeter > > -- > Thank you for your direction. Cheers, meowthink [1] http://lists.dragonflybsd.org/pipermail/commits/2017-August/626190.html [2] https://reviews.freebsd.org/D11780