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: <20150109142700.GF495@console-pimps.org>
Date:	Fri, 9 Jan 2015 14:27:00 +0000
From:	Matt Fleming <matt@...sole-pimps.org>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Ingo Molnar <mingo@...nel.org>, Jiri Olsa <jolsa@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Andi Kleen <andi@...stfloor.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	linux-kernel@...r.kernel.org, "H. Peter Anvin" <hpa@...or.com>,
	Kanaka Juvva <kanaka.d.juvva@...el.com>,
	Matt Fleming <matt.fleming@...el.com>
Subject: Re: [PATCH 11/11] perf/x86/intel: Enable conflicting event
 scheduling for CQM

On Thu, 08 Jan, at 12:51:17PM, Peter Zijlstra wrote:
> On Fri, Nov 14, 2014 at 09:15:12PM +0000, Matt Fleming wrote:
> > +/*
> > + * Deallocate the RMIDs from any events that conflict with @event, and
> > + * place them on the back of the group list.
> > + */
> > +static void intel_cqm_sched_out_events(struct perf_event *event)
> > +{
> > +	struct perf_event *group, *g;
> > +	unsigned int rmid;
> >  
> > +	lockdep_assert_held(&cache_mutex);
> > +
> > +	list_for_each_entry_safe(group, g, &cache_groups, hw.cqm_groups_entry) {
> > +		if (group == event)
> > +			continue;
> > +
> > +		rmid = group->hw.cqm_rmid;
> > +
> > +		/*
> > +		 * Skip events that don't have a valid RMID.
> > +		 */
> > +		if (!__rmid_valid(rmid))
> > +			continue;
> > +
> > +		/*
> > +		 * No conflict? No problem! Leave the event alone.
> > +		 */
> > +		if (!__conflict_event(group, event))
> > +			continue;
> > +
> > +		intel_cqm_xchg_rmid(group, INVALID_RMID);
> > +		__put_rmid(rmid);
> > +
> > +		list_move_tail(&group->hw.cqm_groups_entry, &cache_groups);
> > +	}
> >  }
> 
> I'm not sure about that list_move_tail() there, is wrecks the rotation
> order and would cause conflicting events to get less than their 'fair'
> share I suspect.

Good point, this is just plain wrong. 

-- 
Matt Fleming, Intel Open Source Technology Center
--
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