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]
Date:	Fri, 22 May 2015 13:28:00 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Stephane Eranian <eranian@...gle.com>
Cc:	Ingo Molnar <mingo@...nel.org>,
	Vince Weaver <vincent.weaver@...ne.edu>,
	Jiri Olsa <jolsa@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 02/10] perf/x86: Improve HT workaround GP counter
 constraint

On Fri, May 22, 2015 at 01:21:46PM +0200, Peter Zijlstra wrote:
> @@ -821,8 +828,24 @@ int x86_schedule_events(struct cpu_hw_ev
>  
>  	/* slow path */
>  	if (i != n) {
> +		int gpmax = x86_pmu.num_counters / 2;
> +
> +		/*
> +		 * Do not allow scheduling of more than half the available
> +		 * generic counters.
> +		 *
> +		 * This helps avoid counter starvation of sibling thread by
> +		 * ensuring at most half the counters cannot be in exclusive
> +		 * mode. There is no designated counters for the limits. Any
> +		 * N/2 counters can be used. This helps with events with
> +		 * specific counter constraints.
> +		 */
> +		if (is_ht_workaround_enabled() && !cpuc->is_fake &&
> +		    READ_ONCE(cpuc->excl_cntrs->exclusive_present))
> +			gpmax /= 2;
> +
>  		unsched = perf_assign_events(cpuc->event_constraint, n, wmin,
> -					     wmax, assign);
> +					     wmax, gpmax, assign);
>  	}
>  

Hmm, I divide by 2 twice.. no wonder it doesn't quite work as expected.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ