This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: FOR REVIEW: New x86-64 vsyscall vgetcpu()
- From: Andi Kleen <ak at suse dot de>
- To: Gerd Hoffmann <kraxel at suse dot de>
- Cc: Tony Luck <tony dot luck at intel dot com>, discuss at x86-64 dot org, linux-kernel at vger dot kernel dot org, libc-alpha at sourceware dot org, vojtech at suse dot cz
- Date: Fri, 16 Jun 2006 09:37:22 +0200
- Subject: Re: FOR REVIEW: New x86-64 vsyscall vgetcpu()
- References: <200606140942.31150.ak@suse.de> <200606160822.23898.ak@suse.de> <44925C78.7030100@suse.de>
On Friday 16 June 2006 09:23, Gerd Hoffmann wrote:
> Andi Kleen wrote:
> >> Alternatively it means that this will almost always do the right thing, but
> >> once in a while it won't, your application will happen to have been migrated
> >> to a different cpu/node at the point it makes the call, and from then on
> >> this instance will behave oddly (running slowly because it allocates most
> >> of its memory on the wrong node). When you try to reproduce the problem,
> >> the application will work normally.
> >
> > That's inherent in NUMA. No good way around that.
>
> Hmm, maybe it makes sense to allow binding memory areas to threads
> instead of nodes. That way the kernel may attempt to migrate the pages
> to another node in case it migrates threads / processes. Either via
> mbind(), or maybe better via madvise() to make clear it's a hint only.
I haven't tried that but I have talked to others who tried to implement
automatic page migration and they say they couldn't make that work (or rather
make it a win) either.
-Andi