From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Rik van Riel <riel@redhat.com>
Cc: mingo@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org,
torvalds@linux-foundation.org, pjt@google.com, cl@linux.com,
bharata.rao@gmail.com, akpm@linux-foundation.org,
Lee.Schermerhorn@hp.com, aarcange@redhat.com, danms@us.ibm.com,
suresh.b.siddha@intel.com, tglx@linutronix.de,
linux-tip-commits@vger.kernel.org
Subject: Re: [tip:sched/numa] sched/numa: Introduce sys_numa_{t,m}bind()
Date: Fri, 18 May 2012 17:35:41 +0200 [thread overview]
Message-ID: <1337355341.573.68.camel@twins> (raw)
In-Reply-To: <4FB66756.2060302@redhat.com>
On Fri, 2012-05-18 at 11:14 -0400, Rik van Riel wrote:
>
> I am not convinced this is the right way forward.
Well, you don't have to use it.. but you can.
> While this may work well for programs written in languages
> with pointers, and for virtual machines, I do not see how
> eg. a JVM could provide useful hints to the kernel, because
> the Java program running on top has no idea about the
> memory addresses of its objects, and the Java language has
> no way to hint which thread will be the predominant user
> of an object.
This is one of the many reasons why you'll never see me use Java or any
other 'managed' language.
> I like your code for handling smaller processes in NUMA
> systems, but we do need to have a serious discussion on
> how to handle processes that do not fit in one node.
>
> The more I think about it, the more Andrea's code looks
> like it might be the more flexible way forward.
I still have serious concerns about his approach; it very much assumes
there's a temporal page<->thread relation to exploit. This might not at
all be true for some programs (including JVM) that have hardly any data
separation and just point chase their way around the entire object set.
Consider a database where each thread is basically scanning the global
data-set at random.
Furthermore, virtual machines actively counter this assumption, a guest
scheduler will move tasks between vcpus at will -- for the host this
effective scrambles any page<->thread (vcpu) relation that might have
existed.
I've also yet to see a coherent patch-set from Andrea with coherent
changelogs and comments (this very much precludes PDFs of any kind).
And you know I detest the way he cobbled his way around the scheduler
instead of integrating it properly. And I'll very much not accept
anything like the spaghetti code anywhere near the scheduler I have to
maintain. (I recently looked at the THP code and if that's the standard
I'm not having it).
That said, I'll leave the door open and will consider something like his
scanning stuff as an optional add on on-top of this.
I very much believe in doing the simple thing first, and this is that,
this is much like what the userspace daemons try to do and many of the
traditional Unixes have also done (albeit many of those didn't go the
way of home-node migration).
> Another topic to discuss is whether we want lazy
> migrate-on-fault, or if we want to keep the program
> spend its time running, using another (idle) core to
> do the migration in the background.
I've also said many times over that I absolutely detest all the async
stuff because it messes up accounting. And until someone comes up with a
sane means of sorting that I'll stick to migrate-on-fault.
You also assume there's idle time elsewhere. This isn't true in general.
next prev parent reply other threads:[~2012-05-18 15:36 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-18 10:42 [tip:sched/numa] sched/numa: Introduce sys_numa_{t,m}bind() tip-bot for Peter Zijlstra
2012-05-18 15:14 ` Rik van Riel
2012-05-18 15:25 ` Christoph Lameter
2012-05-18 15:33 ` Peter Zijlstra
2012-05-18 15:37 ` Christoph Lameter
2012-05-18 15:47 ` Peter Zijlstra
2012-05-18 15:35 ` Peter Zijlstra [this message]
2012-05-18 15:40 ` Peter Zijlstra
2012-05-18 15:47 ` Christoph Lameter
2012-05-18 15:49 ` Peter Zijlstra
2012-05-18 16:00 ` Christoph Lameter
2012-05-18 16:04 ` Peter Zijlstra
2012-05-18 16:07 ` Christoph Lameter
2012-05-18 15:48 ` Rik van Riel
2012-05-18 16:05 ` Peter Zijlstra
2012-05-19 11:19 ` Ingo Molnar
2012-05-19 11:09 ` Ingo Molnar
2012-05-19 10:32 ` Pekka Enberg
2012-05-20 2:23 ` David Rientjes
2012-05-21 8:40 ` Ingo Molnar
2012-05-22 2:16 ` David Rientjes
2012-05-22 2:42 ` David Rientjes
2012-05-22 12:04 ` Peter Zijlstra
2012-05-22 15:00 ` Peter Zijlstra
2012-05-23 16:00 ` Peter Zijlstra
2012-05-24 0:58 ` David Rientjes
2012-05-25 8:35 ` Peter Zijlstra
2012-05-31 22:03 ` Peter Zijlstra
2012-05-30 13:37 ` [tip:sched/urgent] sched: Fix SD_OVERLAP tip-bot for Peter Zijlstra
2012-05-30 13:38 ` [tip:sched/urgent] sched: Make sure to not re-read variables after validation tip-bot for Peter Zijlstra
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=1337355341.573.68.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=Lee.Schermerhorn@hp.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=bharata.rao@gmail.com \
--cc=cl@linux.com \
--cc=danms@us.ibm.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=pjt@google.com \
--cc=riel@redhat.com \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/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).