linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bill Davidsen <davidsen@tmr.com>
To: Andrew Theurer <habanero@us.ibm.com>,
	"Martin J. Bligh" <mbligh@aracnet.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org, ricklind@us.ibm.com
Subject: Re: [patch] HT scheduler, sched-2.5.68-B2
Date: Thu, 24 Apr 2003 17:29:40 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.3.96.1030424162544.11351D-100000@gatekeeper.tmr.com> (raw)
In-Reply-To: <1574320000.1051137515@flay>

On Wed, 23 Apr 2003, Andrew Theurer wrote:

> Well on high load, you shouldn't have an idle cpu anyway, so you would never 
> pass the requirements for the agressive -idle- steal even if it was turned 
> on.   On low loads on HT, without this agressive balance on cpu bound tasks, 
> you will always load up one core before using any of the others.  When you 
> fork/exec, the child will start on the same runqueue as the parent, the idle 
> sibling will start running it, and it will never get a chance to balance 
> properly while it's in a run state.  This is the same behavior I saw with the 
> NUMA-HT solution, because I didn't have this agressive balance (although it 
> could be added I suppose), and as a result it consistently performed less 
> than Ingo's solution (but still better than no patch at all).

Sorry if I misunderstand, but if HT is present, I would think that you
would want to start the child of a fork on the same runqueue, because the
cache is loaded, and to run the child first because in many cases the
child will do and exac. At that point it is probable that the exec'd
process run on another CPU would leave the cache useful to the parent.

I fully admit that this is "seems to me" rather than measured, but
protecting the cache is certainly a good thing in general.


On Wed, 23 Apr 2003, Martin J. Bligh wrote:

> Actually, what must be happening here is that we're agressively stealing
> things on non-HT machines ... we should be able to easily prevent that.
> 
> Suppose we have 2 real cpus + HT ... A,B,C,D are the cpus, where A, B 
> are HT twins, and C,D are HT twins. A&B share runqueue X, and C&D share
> runqueue Y
> 
> What I presume you're trying to do is when A and B are running 1 task
> each, and C and D are not running anything, balance out so we have
> one on A and one on C. If we define some "nr_active(rq)" concept to be
> the number of tasks actually actively running on cpus, then if we we're
> switching from nr_actives of 2/0 to 1/0.
> 
> However, we don't want to switch from 2/1 to 1/2 ... that's pointless.
> Or 0/1 to 1/0 (which I think it's what's happening). But in the case
> where we had (theoretically) 4 HT siblings per real cpu, we would want
> to migrate 1/3 to 2/2.
> 
> The key is that we want to agressively steal when 
> nr_active(remote) - nr_active(idle) > 1 ... not > 0.
> This will implicitly *never* happen on non HT machines, so it seems
> like a nice algorithm ... ?

Is it really that simple? 

-- 
bill davidsen <davidsen@tmr.com>
  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.


  reply	other threads:[~2003-04-24 21:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-23 16:23 [patch] HT scheduler, sched-2.5.68-B2 Ingo Molnar
2003-04-23 17:47 ` Martin J. Bligh
2003-04-23 17:53   ` Andrew Theurer
2003-04-23 18:43     ` Martin J. Bligh
2003-04-23 20:14       ` Andrew Theurer
2003-04-24  8:43         ` Rick Lindsley
2003-04-24 14:23           ` Andrew Theurer
2003-04-23 22:38       ` Martin J. Bligh
2003-04-24 21:29         ` Bill Davidsen [this message]
2003-04-24 22:39           ` Martin J. Bligh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.3.96.1030424162544.11351D-100000@gatekeeper.tmr.com \
    --to=davidsen@tmr.com \
    --cc=habanero@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@aracnet.com \
    --cc=mingo@elte.hu \
    --cc=ricklind@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).