Re: [RFC] perf_events: ctx_flexible_sched_in() not maximizing PMUutilization

From: Peter Zijlstra
Date: Thu May 06 2010 - 13:30:38 EST


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.

--
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/