public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 2.6.0 batch scheduling, HT aware
@ 2003-12-23  0:38 Con Kolivas
  2003-12-23  1:11 ` Nick Piggin
  2003-12-26 22:56 ` Pavel Machek
  0 siblings, 2 replies; 31+ messages in thread
From: Con Kolivas @ 2003-12-23  0:38 UTC (permalink / raw)
  To: linux kernel mailing list; +Cc: Nick Piggin

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.

Patch available here:
http://ck.kolivas.org/patches/2.6/2.6.0/

Con


^ permalink raw reply	[flat|nested] 31+ messages in thread
* RE: [PATCH] 2.6.0 batch scheduling, HT aware
@ 2003-12-23  1:59 Nakajima, Jun
  2003-12-23  2:40 ` Nick Piggin
  0 siblings, 1 reply; 31+ messages in thread
From: Nakajima, Jun @ 2003-12-23  1:59 UTC (permalink / raw)
  To: Nick Piggin; +Cc: Con Kolivas, linux kernel mailing list

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@cyberone.com.au]
> 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?
> 


^ permalink raw reply	[flat|nested] 31+ messages in thread
* RE: [PATCH] 2.6.0 batch scheduling, HT aware
@ 2003-12-23  5:33 Nakajima, Jun
  2003-12-23 10:13 ` Nick Piggin
  0 siblings, 1 reply; 31+ messages in thread
From: Nakajima, Jun @ 2003-12-23  5:33 UTC (permalink / raw)
  To: Nick Piggin; +Cc: Con Kolivas, linux kernel mailing list

BTW, Nick, does your SMT scheduler have "idle package prioritization"
which chooses an idle logical processor with the other local processor
idle if any (rather than just an idle processor with other local
processor running at full speed), when the scheduler requires an idle
local processor? That would prevent situations like two logical
processors run at full speed in the same processor package, with the
other processor package(s) idle in a same processor package(s). I
haven't reviewed your latest patch closely, and that is the one of the
things I want to do during the holidays.

One question. Why did you remove SD_FLAG_IDLE flag from cpu_domain
initialization in the w27 patch? We've been seeing some performance
degradation with w27, compared to w26.

Jun

> -----Original Message-----
> From: Nick Piggin [mailto:piggin@cyberone.com.au]
> Sent: Monday, December 22, 2003 6:41 PM
> To: Nakajima, Jun
> Cc: Con Kolivas; linux kernel mailing list
> Subject: Re: [PATCH] 2.6.0 batch scheduling, HT aware
> 
> 
> 
> Nakajima, Jun wrote:
> 
> >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.
> >
> 
> No. The mechanism would be generic, but the parameters would be
> arch specific as part of my sched domains patch (if I have anything
> to do with it!)
> 


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2004-01-02 23:34 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-23  0:38 [PATCH] 2.6.0 batch scheduling, HT aware Con Kolivas
2003-12-23  1:11 ` Nick Piggin
2003-12-23  1:24   ` Con Kolivas
2003-12-23  1:36     ` Nick Piggin
2003-12-23  2:42       ` Con Kolivas
2003-12-23  2:57         ` Nick Piggin
2003-12-23  3:15           ` Con Kolivas
2003-12-23  3:16             ` Con Kolivas
2003-12-26 23:03               ` Pavel Machek
2003-12-23 15:51           ` bill davidsen
2003-12-23 22:09             ` Con Kolivas
2003-12-30  0:35               ` bill davidsen
2004-01-02 20:10     ` Bill Davidsen
2003-12-26 22:56 ` Pavel Machek
2003-12-26 23:42   ` Con Kolivas
2003-12-26 23:49     ` Con Kolivas
2003-12-27 11:09     ` Pavel Machek
2003-12-27 11:15       ` Con Kolivas
2003-12-30  0:29         ` bill davidsen
2003-12-29  7:02       ` Nick Piggin
2003-12-29 12:49         ` Pavel Machek
2003-12-27  8:52   ` Mika Penttilä
2003-12-30  0:32     ` bill davidsen
2004-01-02 20:05   ` Bill Davidsen
2004-01-02 20:56     ` Davide Libenzi
2004-01-02 21:10       ` Valdis.Kletnieks
2004-01-02 23:34         ` Davide Libenzi
  -- strict thread matches above, loose matches on Subject: below --
2003-12-23  1:59 Nakajima, Jun
2003-12-23  2:40 ` Nick Piggin
2003-12-23  5:33 Nakajima, Jun
2003-12-23 10:13 ` Nick Piggin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox