mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Lameter <christoph@lameter.com>
To: Andi Kleen <ak@suse.de>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org, gregkh@suse.de
Subject: Re: [PATCH] Run PCI driver initialization on local node
Date: Thu, 7 Jul 2005 06:52:58 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.62.0507070642370.22915@graphe.net> (raw)
In-Reply-To: <20050707103918.GV21330@wotan.suse.de>

On Thu, 7 Jul 2005, Andi Kleen wrote:

> > The slab allocator will do the right thing with the numa slab allocator in 
> > Andrew's tree but not with the one in Linus'tree. The one is Linus tree
> > will just pickup whatever slab is available irregardless of the node.
> 
> It should usually do the right thing because it
> runs on the correct CPUs. The only case that doesn't work 
> is freeing on different CPUs than it was allocated, but hopefully
> that is not too common during system startup.

The current slab wont do that unless you allocate enough entries so 
that a new page is retrieved from the page allocator. Then you may have 
local memory from the slab (if the memory policy is not on round robin).

If you allocate some slab entries on one node then you typically have a 
partially used page from that node. If you then switch to a different 
processor on a different node and then use the slab allocator to get an 
entry for that slab then that partially used page will be used! The
slab allocator will return an entry from the *prior* node.

> And then at some point NUMA aware slab will make it into mainline > I guess.

Hopefully.

> > Only kmalloc_node will make a reasonable attempt to locate the memory on 
> > a specific node.
> 
> You forgot __get_free_pages.

The slab allocator uses alloc_pages and alloc_pages_node

  reply	other threads:[~2005-07-07 13:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-06 13:32 Andi Kleen
2005-07-06 16:35 ` Christoph Lameter
2005-07-06 17:56   ` Andi Kleen
2005-07-06 18:01     ` Christoph Lameter
2005-07-06 18:13       ` Andi Kleen
2005-07-06 18:28         ` Christoph Lameter
2005-07-06 19:31         ` Christoph Lameter
2005-07-06 19:33     ` Christoph Lameter
2005-07-07 10:39       ` Andi Kleen
2005-07-07 13:52         ` Christoph Lameter [this message]
2005-07-07 14:13           ` Andi Kleen

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.62.0507070642370.22915@graphe.net \
    --to=christoph@lameter.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.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

all inboxes | Powered by JetHome®