mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Yinghai Lu" <yhlu.kernel@gmail.com>
To: "Greg KH" <greg@kroah.com>
Cc: "Christoph Lameter" <clameter@sgi.com>,
	akpm@linux-foundation.org, ak@suse.de, rientjes@google.com,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/4] try parent numa_node at first before using default
Date: Mon, 9 Jul 2007 23:22:26 -0700	[thread overview]
Message-ID: <86802c440707092322k6906cdefgae821dbf8e21ef60@mail.gmail.com> (raw)
In-Reply-To: <20070710044911.GB10748@kroah.com>

On 7/9/07, Greg KH <greg@kroah.com> wrote:
> On Mon, Jul 09, 2007 at 05:52:34PM -0700, Christoph Lameter wrote:
> > It means that the node for the device is the same as the parent device.
> > F.e. if the parent device is a bus that is connected to node 4 then all
> > the devices hooked up to the bus are allocated on that node.
>
> Yes, but is someone setting the parent device node information properly?

> And this really needs some more changelog information please.  Why is
> this needed from how things are done today?

please check if you are happy with the changlog

----------------------------------------------------begin---------------------
For pci_device, pcibios_scan_root and pci_scan_root will call pci_device_add.
pci_device_add will call device_initialize and set_dev_node(&dev->dev,
pcibus_to_node(bus)).
other device such as netdev, and usb_device, set_dev_node is never be
used. So that field numa_node always is -1.

So for netdev, it will need to use dev->parent to get pci_device to
use it's numa_node. esp in netdev_alloc_skb()
not sure how other device such as infiniband do that.

Actually before patch
[PATCH 1/2] x86_64: get mp_bus_to_node as early
there is a bug about squence of bus->sysdata and using pcibus_to_node.
the numa_node of pci_dev->dev is never set correctly...always 0.

So some device have to use pcibus_to_node(to_pci_dev(dev)->bus) directly
such as dma_alloc_pages in arch/x86_64/kernel/pci-dma.c.
or hwif_to_node in include/linux/ide.h

with this patch, we could use device->numa_node direclty for all device.
-------------------------------------------------end-----------



YH

  reply	other threads:[~2007-07-10  6:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200707031835.l63IZo9K008197@imap1.linux-foundation.org>
2007-07-04  0:31 ` Yinghai Lu
2007-07-10  0:44   ` Greg KH
2007-07-10  0:52     ` Christoph Lameter
2007-07-10  4:49       ` Greg KH
2007-07-10  6:22         ` Yinghai Lu [this message]
2007-07-10  1:03     ` Yinghai Lu

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=86802c440707092322k6906cdefgae821dbf8e21ef60@mail.gmail.com \
    --to=yhlu.kernel@gmail.com \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rientjes@google.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®