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: Thursday, May 6, 2010 - 7:20 am

On Thu, 2010-05-06 at 16:03 +0200, Stephane Eranian wrote:

Sure, but it will make scheduling much more expensive. The current
scheme will only ever check the first N events because it stops at the
first that fails, and since you can max fix N events on the PMU its
constant time.

To fix this issue you'd have to basically always iterate all events and
only stop once the PMU is fully booked, which reduces to an O(n) worst
case algorithm.

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.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

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