Messages in this thread | | | Subject | Re: [RFC] perf_events: ctx_flexible_sched_in() not maximizing PMU utilization | From | Peter Zijlstra <> | Date | Thu, 06 May 2010 19:30:24 +0200 |
| |
On Thu, 2010-05-06 at 19:11 +0200, Frederic Weisbecker wrote:
> > But yeah, I did think of making the thing an RB-tree and basically > > schedule on service received, that should fix the lop-sided RR we get > > with constrained events.
> I don't understand what you mean by schedule on service received, and why > an rbtree would solve that.
Schedule those events that got scheduled least, if because of constraints we didn't fully utilize the PMU it is very likely that strict RR (like we do now) will not end up giving equal service to each counter/group.
Therefore, if you sort them in a tree, based on the amount of time they got on the PMU, and always schedule the leftmost, you do get fairness.
Sure you can go add weights to them, but that's not the immediate goal.
| |