Re: [PATCHv2 1/1] perf/x86/intel: make error messages less confusing

From: Eduardo Valentin
Date: Thu Sep 13 2018 - 20:01:00 EST


Hey Peter,

On Thu, Sep 06, 2018 at 09:21:49AM +0200, Peter Zijlstra wrote:
> On Wed, Sep 05, 2018 at 02:47:07PM -0700, Andi Kleen wrote:
> > On Wed, Sep 05, 2018 at 08:53:17AM -0700, Eduardo Valentin wrote:
> > > On Wed, Sep 05, 2018 at 10:52:12AM +0200, Peter Zijlstra wrote:
> > > > On Thu, Aug 23, 2018 at 08:07:32AM -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 leading to wrong understanding that the kernel
> > > > > does not support the CPU model.
> > > >
> > > > Send them back to first grade, such that they might learn to read?
> > > >
> > >
> > > :-)
> >
> > I think it's a valid concern, I guess Eduardo actually has real people
> > who got confused.
>
> But it is really easy to confuse real people; as real people are mostly
> clueless. There is only so much you can do for the semi illiterate
> masses. Should we dumb down everything to baby talk just to cater to
> them?
>
> The string is clearly prefixed by the subsystem, if you get confused by
> that your reading comprehension really is rock bottom.
>
> [ 0.100114] Performance Events: unsupported p6 CPU model 85 no PMU driver, software events only.
>

Once again, the confusing part is the "unsupported CPU".

> Heck, it even mentions "no PMU driver", how much clues do you need?
> Also, the proposed alternative:
>
> [ 0.667154] Performance Events: CPU does not support PMU: no PMU driver, software events only.
>
> Looses out information on which CPU family we failed on. Nor does it


Maybe keeping the CPU family and rephrasing the unsupported part?

> mention the most likely reason for this error: virt crap.
>
> I'd not mind a warning like:
>
> [] Performance Events: Your crappy virt solution is lying about it's CPU model, it doesn't have a (matching) PMU.
>

Well, I would be OK if the kernel spits out a message saying that vPMU is disabled or something.
That would be more accurate than unsupported CPU.

>
>

--
All the best,
Eduardo Valentin