All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: Eduardo Valentin <eduval@amazon.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, Peter Zijlstra <peterz@infradead.org>,
	Kan Liang <kan.liang@linux.intel.com>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Jia Zhang <qianyue.zj@alibaba-inc.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] perf/x86/intel: make error messages less confusing
Date: Tue, 21 Aug 2018 16:59:08 -0700	[thread overview]
Message-ID: <20180821235908.GW12066@tassilo.jf.intel.com> (raw)
In-Reply-To: <20180821230522.GA10816@u40b0340c692b58f6553c.ant.amazon.com>

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

  reply	other threads:[~2018-08-21 23:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-21 21:15 [PATCH 1/1] perf/x86/intel: make error messages less confusing Eduardo Valentin
2018-08-21 22:09 ` Andi Kleen
2018-08-21 23:05   ` Eduardo Valentin
2018-08-21 23:59     ` Andi Kleen [this message]
2018-08-22 20:57       ` Eduardo Valentin
2018-08-22  8:45     ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180821235908.GW12066@tassilo.jf.intel.com \
    --to=ak@linux.intel.com \
    --cc=dan.carpenter@oracle.com \
    --cc=eduval@amazon.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=qianyue.zj@alibaba-inc.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.