Re: [RFC] perf_events: ctx_flexible_sched_in() not maximizing PMU utilization

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Peter Zijlstra
Date: Friday, May 7, 2010 - 3:06 am

On Fri, 2010-05-07 at 11:37 +0200, Stephane Eranian wrote:


Ah indeed, I should have clarified that.


Yes, although I would state the action like: "consider me for
scheduling", since there might not be place for all eligible events on
the PMU.

[ If you start adding weights (like we do for task scheduling) this
becomes a weighted average. ]


Exactly.


Perfectly!

So the ramification of not using a greedy algorithm is that the
potential schedule of constrained events/groups gets longer than is
absolutely required, but I think that is something we'll have to live
with, since O(n) just isn't a nice option.

This can be illustrated if we consider B to be exclusive with both A and
C, in that case we could end up with:

/ {A}, {B}, {C} /

instead of

/ {A, C}, {B} /

Depending on the order in which we find events sorted.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [RFC] perf_events: ctx_flexible_sched_in() not maximiz ..., Frederic Weisbecker, (Thu May 6, 10:11 am)
Re: [RFC] perf_events: ctx_flexible_sched_in() not maximiz ..., Peter Zijlstra, (Fri May 7, 3:06 am)