Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp169791imm; Tue, 21 Aug 2018 17:00:39 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxmy0klh1kIEdwbrgMWVpIhzKa/I8SmSfPV78ZOdc7SdA5Cypf8JdNNK8zo3qnIOhYIjhTV X-Received: by 2002:a17:902:a983:: with SMTP id bh3-v6mr52081812plb.245.1534896039299; Tue, 21 Aug 2018 17:00:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534896039; cv=none; d=google.com; s=arc-20160816; b=sQKFj2jQP6b9BlLfWVhJTS9kyLr30mEj/e3jR+NPg9CBAYt/jSof8NaaRetcavTXJH Y7+J/XhfaJidk2pbe8VfzyG5vtXejqAl0/SlAvcXabsxORFrt+hbQ9jG5iAZKxU0Fkg7 7fN36A4OhOMct/VT62hVIt/tUgB79CvmE2NVa8+SDKOFwQnLjuJzgMq0KXiQ6pZH0Xgt EpRw2UwMAqtVSVc4QN60OGV+S2uSjRkmfatdgSIrPmxYROksQNV1riP8fIQXLJw1fOT7 jUZP+lO6aINq3gxsYqz8AZP2alQu2L4bg0Qg4VZ8Jpohx9BNox8tWxVBcI5VxIzN+xri cP2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=oUnPj+ZXDTwH0Jz+JML6x6IvN5p18I/MJwxZAb4WLQg=; b=UrIvGHZ4G+gEjGpYhxZ6ImvxfTu8445mh36FlNIwYIvHthSfdSPrz42V0dBdKTQKn8 7sFfULekL8q1UbjME9tBlT5D58DfPAYM/BQEkyVSVsRK5BEzIn6alnGPb2m4qXrEMFlb 6i4sPg+HS8OaP6TTFKGRduyvO4H0VE25q649Ko9fRBHCm3UVv12aB8iqqMCm6UL2nbVB zdJnCeY8jobeKNV6MHErfRHrQy4uprFKC+WauOhcmdpipIXA4IC8EdN+SlaNJujIbijh xhR5uNp8eUMuG2zK4pHbf50/qSYoN4y+y3QqT1EDdU+rND0Ttbw/aY0kgB4+tVqvZFOa j8Hw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j8-v6si111836pll.493.2018.08.21.17.00.21; Tue, 21 Aug 2018 17:00:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727794AbeHVDV1 (ORCPT + 99 others); Tue, 21 Aug 2018 23:21:27 -0400 Received: from mga17.intel.com ([192.55.52.151]:25777 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727016AbeHVDV1 (ORCPT ); Tue, 21 Aug 2018 23:21:27 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Aug 2018 16:59:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,271,1531810800"; d="scan'208";a="74643959" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.126]) by FMSMGA003.fm.intel.com with ESMTP; 21 Aug 2018 16:59:08 -0700 Received: by tassilo.localdomain (Postfix, from userid 1000) id 8B8BE301B91; Tue, 21 Aug 2018 16:59:08 -0700 (PDT) Date: Tue, 21 Aug 2018 16:59:08 -0700 From: Andi Kleen To: Eduardo Valentin Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Peter Zijlstra , Kan Liang , Dan Carpenter , Jia Zhang , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] perf/x86/intel: make error messages less confusing Message-ID: <20180821235908.GW12066@tassilo.jf.intel.com> References: <20180821211528.8575-1-eduval@amazon.com> <20180821220937.GV12066@tassilo.jf.intel.com> <20180821230522.GA10816@u40b0340c692b58f6553c.ant.amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180821230522.GA10816@u40b0340c692b58f6553c.ant.amazon.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 21, 2018 at 04:05:22PM -0700, Eduardo Valentin wrote: > On Tue, Aug 21, 2018 at 03:09:37PM -0700, Andi Kleen wrote: > > On Tue, Aug 21, 2018 at 02:15:28PM -0700, Eduardo Valentin wrote: > > > On a system with X86_FEATURE_ARCH_PERFMON disabled > > > and with a model not known by family PMU drivers, > > > user gets a kernel message log like the following: > > > [ 0.100114] Performance Events: unsupported p6 CPU model 85 no PMU driver, software events only. > > > > > > The "unsupported .. CPU" part may be confusing for some > > > users. Rewording the messages on the failure path to: > > > [ 0.667154] Performance Events: unknown p6 PMU on CPU model 85: !X86_FEATURE_ARCH_PERFMON: no PMU driver, software events only. > > > > Are you sure users even know what ARCH_PERFMON is? > > > > Maybe it is confusing (why exactly?), but it doesn't seem to me that your > > new message is any better. > > Yeah, the part that says "unsupported CPU" is the confusing part, That makes sense. > I get people thinking that the specific reported CPU model is not > supported by the kernel :-) > > > > > If you refer to VMs not exposing the PMU perhaps that should be explicitely mentioned. > > > > Of course the real fix is to always expose the PMU, not improve the error messages... > > I agree that best is simply to enable PMU. But it does not hurt to improve the error messaging, does it? > > Any suggestions there, given that the initial attempt seams to make it even worse :-) Perhaps just say "CPU does not support PMU" which is really what the problem is here. The other option would be to move this message after the big model switch, but would need to be very careful that it doesn't have any unintended side effects. -Andi