linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: Nick Piggin <npiggin@suse.de>
Cc: Andi Kleen <ak@suse.de>, Ingo Molnar <mingo@elte.hu>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [rfc] balance-on-fork NUMA placement
Date: Thu, 2 Aug 2007 22:47:13 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0708022234130.14362@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20070803031426.GA28310@wotan.suse.de>

On Fri, 3 Aug 2007, Nick Piggin wrote:

> Well what's wrong with it? It seems to use memory policies for exactly
> what they are intended (aside from it being kernel directed...).

Sure I think you could do it with some effort. They were primarily 
designed for user space. Lots of little side issues where surprises await 
you. I think Lee documented many of them. See the recent mm commits.

> > start the new thread and can the original processor wait on some flag 
> > until that is complete?
> 
> I guess you could, but that is going to add a context switch to fork
> (although it usually already has one in single-CPU situation because we
> run child first)... I bet it will slow something down, but it would be
> interesting to see.

The context switch is needed at some point anyways to get the new process 
running on the new CPU? Just do it before allocating structures. That way 
the potential memory policy and cpuset context is preserved and followed.

> I don't know the fork path well enough off the top of my head to know if
> it will be that simple (with error handling etc). But I think it could
> be done.

I would think that the forking process has to wait on completion anyways
and get an error code.

> > Forking off from there not only places the data correctly but it also 
> > warms up the caches for the new process and avoids evicting cacheline on 
> > the original processor.
> 
> Yeah, you might be right there. If the numbers say that approach is
> better, then I'd not be against it. But we'd still need the simpler
> mpol approach to compare it with. 

Lets hope that the simpler process is really simpler after all the corner 
cases have been dealt with.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2007-08-03  5:47 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-31  5:41 Nick Piggin
2007-07-31  8:01 ` Ingo Molnar
2007-08-01  0:21   ` Nick Piggin
2007-08-01  6:19     ` Ingo Molnar
2007-07-31  9:14 ` Andi Kleen
2007-07-31 23:40   ` Christoph Lameter
2007-08-01  8:39     ` Andi Kleen
2007-08-02  3:42     ` Nick Piggin
2007-08-02 19:58       ` Christoph Lameter
2007-08-03  0:26         ` Nick Piggin
2007-08-03  0:52           ` Christoph Lameter
2007-08-03  0:57             ` Nick Piggin
2007-08-03  1:02               ` Christoph Lameter
2007-08-03  1:14                 ` Nick Piggin
2007-08-03  1:34                   ` Christoph Lameter
2007-08-03  3:14                     ` Nick Piggin
2007-08-03  5:47                       ` Christoph Lameter [this message]
2007-08-01  0:23   ` Nick Piggin
2007-08-01 17:53     ` Martin Bligh
2007-08-01 18:32       ` Lee Schermerhorn
2007-08-01 22:52         ` Martin Bligh
2007-08-02  1:36           ` Nick Piggin
2007-08-02 18:33             ` Martin Bligh
2007-08-03  0:20               ` Nick Piggin
2007-08-03 20:10                 ` Siddha, Suresh B
2007-08-06  1:20                   ` Nick Piggin
2007-08-02 14:49           ` Lee Schermerhorn

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.4.64.0708022234130.14362@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@elte.hu \
    --cc=npiggin@suse.de \
    /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