lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180806213323.GK4238@tassilo.jf.intel.com>
Date:   Mon, 6 Aug 2018 14:33:23 -0700
From:   Andi Kleen <ak@...ux.intel.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     kan.liang@...ux.intel.com, tglx@...utronix.de, mingo@...hat.com,
        acme@...nel.org, linux-kernel@...r.kernel.org, eranian@...gle.com,
        alexander.shishkin@...ux.intel.com
Subject: Re: [PATCH 2/3] x86, perf: Add a separate Arch Perfmon v4 PMI handler

On Mon, Aug 06, 2018 at 08:35:15PM +0200, Peter Zijlstra wrote:
> > +static bool disable_counter_freezing;
> > +module_param(disable_counter_freezing, bool, 0444);
> > +MODULE_PARM_DESC(disable_counter_freezing, "Disable counter freezing feature."
> > +		"The PMI handler will fall back to generic handler."
> > +		"Default is false (enable counter freezing feature).");
> 
> Why?

See the description. Counter freezing took some time to stabilize,
so it seemed better to have a knob to ask users to try in case
there are more problems.
> 
> > +	/*
> > +	 * Ack the PMU late after the APIC.  This avoids bogus
> 
> > +	 * freezing on Skylake CPUs.  The acking unfreezes the PMU
> > +	 */
> That doesn't make sense. PMU and APIC do not have order.> 

It makes a difference for the hardware.

> > +	/*
> > +	 * For arch perfmon 4 use counter freezing to avoid
> > +	 * several MSR accesses in the PMI.
> > +	 */
> > +	if (x86_pmu.counter_freezing) {
> > +		x86_pmu.handle_irq = intel_pmu_handle_irq_v4;
> > +		pr_cont("counter freezing, ");
> > +	}
> 
> Lets not print the counter freezing, we already print v4, right?

I find it useful to see that the kernel has the support, otherwise
you would need to look at the version number, but it gets difficult
with backports. This is another paranoia bit, in case there
are problems.

> > @@ -561,6 +566,7 @@ struct x86_pmu {
> >  	struct x86_pmu_quirk *quirks;
> >  	int		perfctr_second_write;
> >  	bool		late_ack;
> > +	bool		counter_freezing;
> 
> Please make the both of them int or something.

That would make them bigger for no reason?

-Andi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ