Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp546775pxf; Wed, 17 Mar 2021 10:12:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5T3Z6XBueoteYR6z/mqUma4m3H0uGC8ih8FdLV/IlN1XcuSl4YsNLy1H+c7+JFEKHXbc1 X-Received: by 2002:a17:906:7842:: with SMTP id p2mr17207172ejm.87.1616001156445; Wed, 17 Mar 2021 10:12:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616001156; cv=none; d=google.com; s=arc-20160816; b=zI7MjcZHosF+idOPr8n8nHkli1cVuF95SraTqcD7leUfPWR1TaZh/2IyB9YtYhpgPk 9WHotkhgV5sXYZSi0lkmU3qfj2q636IO2LLN0/eHjJvbl8l9nhcs3GDwQPkkNoxuete2 Z4l5OiUSluiAwfoIaH/dSROyJQS7mQyHoXxyr+vwV9Pd19ljIQj+R4wAs/eUL114T7G+ W8ZTP8FyJtwriMSMN94EfJLrTN1YlrWg/BF/azruQZhBOuYr+PHDuKySNQL6qEnfqU4k 3OD2AdRYWwr/Ycu7So8+6QGl5n+UvVkaTeYwWZ8mjKlqbGMjDRU2z0hvYZKN7Qo/OXvm A/Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=FtwJE+4arNtBZ2cGyTHpFp6YG+CsLqhiFgeA3+rwiXE=; b=UFO3O1Iff9L1+yjGhlC/FdnNn/QHN5T90XcAEu03oQ8lxwzCkY+05WfUa2S1q4Yb8z TbzhM4NXbifnWtJt/An74o/UR0PKPnrwclZBSg/rTeS/xeQwbvKnvSxiHoYfRFsqr0Mq T3LDw/hUk36WgcEXNsh3jKrk+KQ2935z3iR+bj+D8rl+k2t07I99oaLZ+Ij3u7PCIrSY jcwjyGvmScH4CIxcqYk1bTIj5roF2bIlHlXAW4X5H96dXNkEbAbY0Bt80DEv8u3GLwIC Vo4dbG0bdzw9nQ/pCmApzHaAURrZzUM1E+8jFIoxA1/pgNBUWlAGTXxHVP19wbZ6DzAl VNYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EMqyfriS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y18si16153521edr.411.2021.03.17.10.12.12; Wed, 17 Mar 2021 10:12:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EMqyfriS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231262AbhCQNiA (ORCPT + 99 others); Wed, 17 Mar 2021 09:38:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:40114 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229809AbhCQNhf (ORCPT ); Wed, 17 Mar 2021 09:37:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BA56664F30; Wed, 17 Mar 2021 13:37:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615988255; bh=uWLJjwbt6az/G89gyUZnzcahOeBXUQO6+rfQjVIDj6k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EMqyfriSWDNrf/7PyPyKwWWl/3YPWhVm9DiAyznVOTgjDzow4BkdbFWl2MELdc9WD 6LJ4OU0u23fUNXVNzCmuV0jILKAaL7vXK1yWhmQqlNJDS7/SF3GlFsQu60Q45kGLOs XQ52BZ3y2P58FfSOmMCr4I7/QqlE2/IUL8RYj0yVHajXBZrSLtMkiN7MXe0D0jU7sL 8lABUzQHSyu8tuH0WFoUUlyltpNUgpjUltj2iK2Y7ApzyVzITwLA+FmddXqoXiyICd EONEj/MvwwJbIpLZSjYHlQZPCRHgbjuutGWAkCll1QFlTYvOv49Ek72nBLoQtEga2s ftDzLl9NH5L0g== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 80C4C40647; Wed, 17 Mar 2021 10:37:31 -0300 (-03) Date: Wed, 17 Mar 2021 10:37:31 -0300 From: Arnaldo Carvalho de Melo To: Alexander Monakov Cc: Peter Zijlstra , Ingo Molnar , Kim Phillips , Jiri Olsa , Borislav Petkov , Tom Lendacky , x86@kernel.org, lkml , Alexander Shishkin , Stanislav Kozina , Michael Petlan , Pierre Amadio , onatalen@redhat.com, darcari@redhat.com, "Rafael J. Wysocki" Subject: Re: unknown NMI on AMD Rome Message-ID: References: <36397980-f897-147f-df55-f37805d869c9@amd.com> <20210317084829.GA474581@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Mar 17, 2021 at 04:32:17PM +0300, Alexander Monakov escreveu: > On Wed, 17 Mar 2021, Peter Zijlstra wrote: > > On Wed, Mar 17, 2021 at 09:48:29AM +0100, Ingo Molnar wrote: > > > > https://developer.amd.com/wp-content/resources/56323-PUB_0.78.pdf > > > 1215 IBS (Instruction Based Sampling) Counter Valid Value > > > May be Incorrect After Exit From Core C6 (CC6) State > > > Description > > > If a core's IBS feature is enabled and configured to generate an interrupt, including NMI (Non-Maskable > > > Interrupt), and the IBS counter overflows during the entry into the Core C6 (CC6) state, the interrupt may be > > > issued, but an invalid value of the valid bit may be restored when the core exits CC6. > > > Potential Effect on System > > > The operating system may receive interrupts due to an IBS counter event, including NMI, and not observe an > > > valid IBS register. Console messages indicating "NMI received for unknown reason" have been observed on > > > Linux systems. > > > Suggested Workaround: None > > > Fix Planned: No fix planned > > Should be simple enough to disable CC6 while IBS is in use. Kim, can you > > please make that happen? > Wouldn't that "magically" significantly speed up workloads running under > 'perf top', in case they don't saturate the CPUs? Scheduling gets > much snappier if the target CPU doesn't need to wake up from deep sleep :) > Alternatively, would you consider adding the errata reference to the > printk message when IBS is in use, and rate-limit it so it doesn't > flood dmesg? Then the user will know what's going on, and may > choose to temporarily disable C-states using the 'cpupower' tool. Would be interesting as well to make 'perf top' realize that somehow (looking at some cpu id, etc) and don't use IBS when C-states are being used and/or warn the user about the situation, i.e. cycles:P can't be used in this machine if C-states are enabled? - Arnaldo