Re: [PATCH] sched: properly account IRQ and RT load in SCHED_OTHER load balancing

Peter Zijlstra
2008-08-21T12:57:11Z

On Thu, 2008-08-21 at 08:47 -0400, Gregory Haskins wrote:
> Peter Zijlstra wrote:
> > OK, how overboard is this? (utterly uncompiled and such)
> >
> > I realized while trying to do the (soft)irq accounting Ingo asked for,
> > that IRQs can preempt SoftIRQs which can preempt RT tasks.
> >
> > Therefore we actually need to account all these times, so that we can
> > subtract irq time from measured softirq time, etc.
> >
> > So this patch does all that.. we could even use this more accurate time
> > spend on the task delta to drive the scheduler.
> >
> > NOTE - for now I've only considered softirq from hardirq time, as
> > ksoftirqd is its own task and is already accounted the regular way.
> >
>
> Actually, if you really want to get crazy, you could account for each RT
> prio level as well ;)
>
> e.g. RT98 tasks have to account for RT99 + softirqs + irqs, RT97 need to
> look at RT98, 99, softirqs, irqs, etc.
>
> I'm not suggesting we do this, per se. Just food for thought. It
> would have the benefit of allowing us to make even better routing
> decisions for RT tasks. E.g. if cores 2 and 6 both have the lowest
> priority, we currently sort by sched-domain topology, but we could also
> factor in the load that is "above" us.

I'll let you be that crazy ;-) It'd be a 3-rd order placement decision,
I doubt that's going to make a large difference.