Re: [PATCH v4 10/11] perf/x86/intel: Perform rotation on Intel CQM RMIDs

From: Matt Fleming
Date: Sun Jan 11 2015 - 05:46:00 EST


On Fri, 09 Jan, at 01:58:29PM, Peter Zijlstra wrote:
>
> Right, but we'll also consider RMIDs with less than this as fit for
> reuse. So we'll re-use RMIDs that are effectively full.
>
> Our aim is to acquire an 'empty' RMID, not give up and start reusing
> full ones just because, right?

The threshold was designed so that we're guaranteed to make forward
progress. If we're bumping the threshold, *none* of the RMIDs on the
limbo list have an occupancy value less than the threshold value.

At that point, we've got two options,

1) Increase the threshold value and further skew the results
2) Steal another RMID and pray it's below the threshold

We actually do both currently.

Now, one thing that we don't do is traverse the entire list of active
RMIDs looking for the least value one, because it's pretty expensive to
do that as it incurs lots of MSR reads and writes.

--
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/