From owner-freebsd-stable@freebsd.org Tue Aug 28 07:54:29 2018 Return-Path: Delivered-To: freebsd-stable@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 B70AF1083182; Tue, 28 Aug 2018 07:54:29 +0000 (UTC) (envelope-from karu.pruun@gmail.com) Received: from mail-oi0-x230.google.com (mail-oi0-x230.google.com [IPv6:2607:f8b0:4003:c06::230]) (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 49C9D77E03; Tue, 28 Aug 2018 07:54:29 +0000 (UTC) (envelope-from karu.pruun@gmail.com) Received: by mail-oi0-x230.google.com with SMTP id m11-v6so1243326oic.2; Tue, 28 Aug 2018 00:54:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eAcgzY1NIaxtckyR7cbFcoGaCaI+5moTYcJs2FjUVuo=; b=mdatqCzHN8VNUWWXrqyEE6bj5OEpRiX0Fy1C8X5oWZ+BYXe+kYAcy3F+iSghmwAMjk PKHr1SUNtBGaThvcJijXGyRJi9Hfz4AtcHfoKrtVHA7XBj/WFFUer+vlmI4CiJNvucyd /Ovvfi70TFt4A7VNz2dEovlvfmSsLsVIOIA9/K6QFfRpaK31Rtu4qrKeqywQVMf3wb0N sCXlalwqXJzNaYTD5sHVQDgdjrOORFb+TEw/LrDtXwuhRFAHYt6kYVlQyhyqR6eTobsB 9DHOimYu/Yd+AAqh5D/GqX3hm85SCpJYp/whxosY3CM/PDidRIYUxfZRGi/gxpU0dsgA EHhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eAcgzY1NIaxtckyR7cbFcoGaCaI+5moTYcJs2FjUVuo=; b=oPMA6TcG3m65SzzcMqZvZm08KoAUPf8w+12jxpln44dNq+V6uAJKxYw+oh7l+Q9oMX JGB+3ej3no3V08fOFupQWP9VPQK9zcaUJF3wEAIr5FDuYuT9IWjkO8GULtpB0bJ9Z5Rs a7yYGFDMZ92HPvhQ9ZbQvNQaWhuaKVI4YAFgOlaZP+o4FApKsgLjJaVIyuTAJ4OVcdyG DMIlxvxw/yMokem9z+SozmOc9qgOeVnMCn4Gs0+zuCcUxGjLg7yaEutxOnkXe5N8ikM6 UZkGQ7U+4pC7QeF61amesotRMnuvDUi/Zk2JHlx+kAn6MyTfFFlOBvJ5Q9CSGJHIK/cN 6tFw== X-Gm-Message-State: APzg51CWmVgimPdlypOM34IWkLRWRFB31XY2NcoVt4dJhSFWw6Xv5niW kYfOmsn3Qs1KZOY2/BfxrNAKNkO4N6m4Lj7aPVUZNTUT X-Google-Smtp-Source: ANB0VdZM9jQ+0ivEdpETv6TMBivVynQBhrl1W2Zl71o2k3f+bKFIs6Dhd6s7xNrGqsB0tNbxaHcusAabGDNQRIuvDKM= X-Received: by 2002:aca:5c85:: with SMTP id q127-v6mr333957oib.127.1535442868629; Tue, 28 Aug 2018 00:54:28 -0700 (PDT) MIME-Version: 1.0 References: <20180827132905.191dbd8c@ernst.home> In-Reply-To: From: "karu.pruun" Date: Tue, 28 Aug 2018 10:54:17 +0300 Message-ID: Subject: Re: Help diagnose my Ryzen build problem To: Si Miao Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 07:54:30 -0000 On Mon, Aug 27, 2018 at 6:07 PM Meowthink wrote: > >> 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? If I was you, I'd play around with the sysctls mentioned above and see if it helps. Start with disabling both mwait and hlt, perhaps machdep.idle=spin machdep.idle_mwait=0 (assuming that 'spin' means hlt will not used) and then if that does not lead to a panic, try enabling mwait. I can't test 2400G since I don't have it any more. I booted FreeBSD a couple of times but did not run it over long periods of time. Cheers Peeter --