Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp857969imm; Wed, 22 Aug 2018 13:59:09 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyMO6lGsYM07IwtZsjHHtEw2Ur7LLHnizPk+832/CMR9N9ypqkxz91jPUf51l7CYPvDjH26 X-Received: by 2002:a65:5803:: with SMTP id g3-v6mr53374647pgr.117.1534971549880; Wed, 22 Aug 2018 13:59:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534971549; cv=none; d=google.com; s=arc-20160816; b=clVrTXKg3o6qUqTD/+tH2y84jyaNhAcTy/RBonrJUL+AF5Dl4afPJ4LpoK8hII/FPR r8jVMy82frUHTiKxFxuCbvB9sGo6wC4BYvUPrzdxVHmx3kTaVJkAVZSCSgHhWaRsJqr4 h5XG3ya0yVUP807sxRavrcrUYgI6ZApR7F9HMiQda8xAYolaCGdfGj0IHE+fq4PwiMX4 IRo/06Jm+4wwyCIrJFx8IctQNwbUA6DymBtupckzCtJPwaMIzj8qIfO1AtiSTPrnnJWA 9wRMtGhGzVx9DOWf+dF8ewcChLOGlamnt/ZrM8psXwWmIVKJgbyHXCUg4YZOn5XXRXHy mcLw== 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:dkim-signature:arc-authentication-results; bh=zQ9PhjyQopjQ/c9sxh+lXJJS7x+awHkBruSQZ/TNQ9Y=; b=KN+oHRPp132/g6ncGwaidU7uDxio0UnIrZWc5bBzWXj09x1olYhIs6Zgp50FHEt1t0 yQ052sCAHifQvFkaxx2N/hiin4GuDxbcotXVoWyV8hmrW3ki7sYEyFxUYwzJFVvb48hg U9YWmjahaB/KsIbKvYFNdgBz898TNntQmIeJ8/TExOYM0Va4fcMyZQmZSEjcfnBjO6a5 HB1RPkmVL7/tApflM1hp8TkNbSzdJJsf+t90bWhs8Dl1KW6Hr/SIcMeCScY8zHJFWvH7 lQM7ZurbkOerXSEwVTAHXTja5idznT6f8WRzmRj3dr+JxE0Sek9O9GjLah2Xp3bzQAxK izCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=fZwsdkaR; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b129-v6si2739880pfa.12.2018.08.22.13.58.53; Wed, 22 Aug 2018 13:59:09 -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; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=fZwsdkaR; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727361AbeHWAXm (ORCPT + 99 others); Wed, 22 Aug 2018 20:23:42 -0400 Received: from smtp-fw-6001.amazon.com ([52.95.48.154]:51149 "EHLO smtp-fw-6001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726760AbeHWAXm (ORCPT ); Wed, 22 Aug 2018 20:23:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1534971433; x=1566507433; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=zQ9PhjyQopjQ/c9sxh+lXJJS7x+awHkBruSQZ/TNQ9Y=; b=fZwsdkaR2/UIPuTBLi2aa2MRXUMu38BrYOixAlffYwl0PaRa3VVDd2qT QnXvkeyKErf0Cos8GVQc7o+tMK7Zj/Zq5MlcZbM+QcYzLYYMHa1ofgbiG yMV54azhjl9AcsfPqTlhBHBaysIr9umRWah1FZKEUUqf1eOMxg19UGNua U=; X-IronPort-AV: E=Sophos;i="5.53,275,1531785600"; d="scan'208";a="353483326" Received: from iad6-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1a-715bee71.us-east-1.amazon.com) ([10.124.125.6]) by smtp-border-fw-out-6001.iad6.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 22 Aug 2018 20:57:12 +0000 Received: from EX13MTAUWB001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1a-715bee71.us-east-1.amazon.com (8.14.7/8.14.7) with ESMTP id w7MKv2ab049996 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Wed, 22 Aug 2018 20:57:08 GMT Received: from EX13D05UWB004.ant.amazon.com (10.43.161.208) by EX13MTAUWB001.ant.amazon.com (10.43.161.207) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 22 Aug 2018 20:57:07 +0000 Received: from EX13MTAUWB001.ant.amazon.com (10.43.161.207) by EX13D05UWB004.ant.amazon.com (10.43.161.208) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 22 Aug 2018 20:57:07 +0000 Received: from localhost (10.55.160.46) by mail-relay.amazon.com (10.43.161.249) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Wed, 22 Aug 2018 20:57:07 +0000 Date: Wed, 22 Aug 2018 13:57:07 -0700 From: Eduardo Valentin To: Andi Kleen CC: Eduardo Valentin , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , , Peter Zijlstra , "Kan Liang" , Dan Carpenter , Jia Zhang , Greg Kroah-Hartman , Subject: Re: [PATCH 1/1] perf/x86/intel: make error messages less confusing Message-ID: <20180822205707.GA16015@u40b0340c692b58f6553c.ant.amazon.com> References: <20180821211528.8575-1-eduval@amazon.com> <20180821220937.GV12066@tassilo.jf.intel.com> <20180821230522.GA10816@u40b0340c692b58f6553c.ant.amazon.com> <20180821235908.GW12066@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20180821235908.GW12066@tassilo.jf.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey, On Tue, Aug 21, 2018 at 04:59:08PM -0700, Andi Kleen wrote: > 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" > Ok. > which is really what the problem is here. > Fair enough. > 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. I will simply remove those messages with CPU model details and on the failure path build the message to look like: [ 0.666785] Performance Events: CPU does not support PMU: no PMU driver, software events only. > > -Andi > -- All the best, Eduardo Valentin