RE: [PATCH] 2.6.0 batch scheduling, HT aware

From: Nakajima, Jun
Date: Mon Dec 22 2003 - 21:00:38 EST


Today utilization of execution resources of a logical processor is
around 60% as you can find in public papers, and it's dependent on the
processor implementation and the workload. It could be higher in the
future, and their relative priority could be much higher then. So I
don't think it's a good idea to hard code such a implementation-specific
factor into the generic scheduler code.

Regarding H/W-based priority, I'm not sure it's very useful especially
because so many events happen inside the processor and a set of the
execution resources required changes very rapidly at runtime, i.e. the
H/W knows what it should do to run faster at runtime, and imposing
priority on those logical processor could make them run slower.

I think a software priority-based solution like the below would be more
generic and work better.
> How about this: if a task is "delta" priority points below a task
running
> on another sibling, move it to that sibling (so priorities via
timeslice
> start working). I call it active unbalancing! I might be able to make
it
> fit if there is interest. Other suggestions?

Jun


> -----Original Message-----
> From: Nick Piggin [mailto:piggin@xxxxxxxxxxxxxxx]
> Sent: Monday, December 22, 2003 5:11 PM
> To: Nakajima, Jun
> Cc: Con Kolivas; linux kernel mailing list
> Subject: Re: [PATCH] 2.6.0 batch scheduling, HT aware
>
>
>
> Con Kolivas wrote:
>
> >I've done a resync and update of my batch scheduling that is also
hyper-
> thread
> >aware.
> >
> >What is batch scheduling? Specifying a task as batch allows it to
only
> use cpu
> >time if there is idle time available, rather than having a proportion
of
> the
> >cpu time based on niceness.
> >
> >Why do I need hyper-thread aware batch scheduling?
> >
> >If you have a hyperthread (P4HT) processor and run it as two logical
cpus
> you
> >can have a very low priority task running that can consume 50% of
your
> >physical cpu's capacity no matter how high priority tasks you are
running.
> >For example if you use the distributed computing client setiathome
you
> will
> >be effectively be running at half your cpu's speed even if you run
> setiathome
> >at nice 20. Batch scheduling for normal cpus allows only idle time to
be
> used
> >for batch tasks, and for HT cpus only allows idle time when both
logical
> cpus
> >are idle.
> >
> >This is not being pushed for mainline kernel inclusion, but the issue
of
> how
> >to prevent low priority tasks slowing down HT cpus needs to be
considered
> for
> >the mainline HT scheduler if it ever gets included. This patch
provides a
> >temporising measure for those with HT processors, and a demonstrative
way
> to
> >handle them in mainline.
> >
>
> I wonder how does Intel suggest we handle this problem? Batch
scheduling
> aside, I wonder how to do any sort of priorities at all? I think
POWER5
> can do priorities in hardware, that is the only sane way I can think
of
> doing it.
>
> I think this patch is much too ugly to get into such an elegant
scheduler.
> No fault to you Con because its an ugly problem.
>
> How about this: if a task is "delta" priority points below a task
running
> on another sibling, move it to that sibling (so priorities via
timeslice
> start working). I call it active unbalancing! I might be able to make
it
> fit if there is interest. Other suggestions?
>

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