mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Erich Focht <efocht@hpce.nec.com>
To: "Martin J. Bligh" <mbligh@aracnet.com>
Cc: Andi Kleen <ak@suse.de>, LSE <lse-tech@lists.sourceforge.net>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [Lse-tech] Node affine NUMA scheduler extension
Date: Wed, 28 May 2003 19:02:35 +0200	[thread overview]
Message-ID: <200305281902.35511.efocht@hpce.nec.com> (raw)
In-Reply-To: <2640000.1054072312@[10.10.2.4]>

On Tuesday 27 May 2003 23:51, Martin J. Bligh wrote:
> > Do you think of something like:
> >
> ># define CAN_MIGRATE_TASK(p,rq,this_cpu)				\
> > 	(HOMENODE_UNSET(p) &&					\ //<--
> > 	 (jiffies - (p)->last_run > cache_decay_ticks) &&	\
> > 		!task_running(rq, p) &&				\
> > 		((p)->cpus_allowed & (1UL << (this_cpu))))
> >
...
>
> My instinct would tell me the first expression should be ||, not &&
> but I'm not 100% sure. 

You're right.

> And is this restricted to just clones? Doesn't
> seem to be, unless that's implicit in homenode_unset?

Hmmm... That's actually the difficult issue with fork vs. clone and
migrating or not. When you clone a small task, you'd usually like to
keep it on the same node. If it's a big task and fault-in a lot of
memory, it could make sense to let it migrate to another node. For
forked tasks it's the same, you mighthave some more COW memory
movement but after that you'll usually be happy if the child went away
from the parent's node if it is a long-running child. Not so for a
short running child. The current compromise:
- start children (no matter whether forked or cloned) on the same CPU
- allow other CPUs to steal freshly forked children by reducing the
cache affinity until the first steal/migration
- ok with chidren who exec soon, they might exec before anyone can
steal them, drop all the pages and find anew life on the optimal node

This way exec'd tasks get properly baklanced, forked/cloned ones get a
better start than in the current scheduler. I'll post a patch on top
of the node affine scheduler doing this in 1-2 days.

Regards,
Erich



  reply	other threads:[~2003-05-28 16:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-27  8:31 Erich Focht
2003-05-27  9:11 ` [Lse-tech] " Andi Kleen
2003-05-27  9:54   ` Erich Focht
2003-05-27 10:01     ` Andi Kleen
2003-05-27 11:39       ` Erich Focht
2003-05-27 11:40         ` Andi Kleen
2003-05-27 11:50           ` Erich Focht
2003-05-27 15:38     ` Martin J. Bligh
2003-05-27 21:28       ` Erich Focht
2003-05-27 21:51         ` Martin J. Bligh
2003-05-28 17:02           ` Erich Focht [this message]
2003-05-28 17:13             ` Martin J. Bligh
2003-05-28 18:14               ` Rick Lindsley
2003-05-28 19:32                 ` 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=200305281902.35511.efocht@hpce.nec.com \
    --to=efocht@hpce.nec.com \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lse-tech@lists.sourceforge.net \
    --cc=mbligh@aracnet.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

all inboxes | Powered by JetHome®