lkml.org 
[lkml]   [2015]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 11/11] perf/x86/intel: Enable conflicting event scheduling for CQM
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.


\
 
 \ /
  Last update: 2015-01-08 13:01    [W:0.158 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site