From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Yinghai.Lu@Sun.COM, Greg KH <greg@kroah.com>,
Andrew Morton <akpm@linux-foundation.org>,
Andi Kleen <ak@suse.de>,
rientjes@google.com, Christoph Lameter <clameter@sgi.com>,
Christoph Hellwig <hch@infradead.org>,
David Miller <davem@davemloft.net>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
netdev@vger.kernel.org
Subject: Re: [PATCH 1/5] try parent numa_node at first before using default
Date: Thu, 12 Jul 2007 13:30:28 +0200 [thread overview]
Message-ID: <469610D4.70009@s5r6.in-berlin.de> (raw)
In-Reply-To: <20070712091529.2b914ece@gondolin.boeblingen.de.ibm.com>
Cornelia Huck wrote:
> On Thu, 12 Jul 2007 07:47:52 +0200,
> Stefan Richter <stefanr@s5r6.in-berlin.de> wrote:
>> Also keep in mind that either device_move() should update the numa_node,
>> or the subsystems which call device_move() should explicitly update it
>> on their own. (Unless they know that their devices will always stay at
>> the same NUMA node even when switching parents.)
>
> I'd trust the subsystems to know best whether something regarding NUMA
> changed.
Generally,
- the *subsystems* know about the topology (parent devices, NUMA
nodes). The assumption that the child device belongs per default to
the same NUMA node as its parent device is usually correct, but it
really is only an assumption.
- The *drivers* incorporate as much knowledge about topology from the
subsystem as is necessary e.g. for correct DMA mapping. E.g. a
device X on bus B which is attached to controller Y needs DMA
mapping for device Y, not for device X. Same, NUMA-optimized
allocations have to be done for the NUMA node of DMA device Y. An
association of device X with a NUMA node is not interesting to the
driver. It becomes a bit more difficult if the driver sits between
two subsystems and that upper-layer subsystem has no flexible API to
pass up the correct NUMA node.
So, since figuring the correct DMA device out is done by drivers
themselves, they usually can figure out the correct NUMA node as well.
The only precondition is that each DMA device has the correct NUMA node
set. This is the job of subsystems like PCI, but it may be reasonable
to have simple and broadly applicable helpers for this in the driver core.
So, _is_ the dev->numa_node = dev->parent.numa_node assumption, if
implemented in device_add() and device_move(), as simple and as broadly
applicable as we want driver core's API to be? Perhaps yes.
--
Stefan Richter
-=====-=-=== -=== -==--
http://arcgraph.de/sr/
next prev parent reply other threads:[~2007-07-12 11:31 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200707101641.17672.yinghai.lu@sun.com>
2007-07-10 23:48 ` [PATCH 3/5] net: make forcedeth to use kmalloc_node and netdev_alloc_skb for skb allocation Yinghai Lu
2007-07-10 23:52 ` [PATCH 1/5] try parent numa_node at first before using default Yinghai Lu
2007-07-11 10:54 ` Stefan Richter
2007-07-11 11:03 ` Stefan Richter
2007-07-11 21:08 ` Greg KH
2007-07-11 21:28 ` Yinghai Lu
2007-07-12 2:47 ` Stefan Richter
2007-07-12 3:01 ` Yinghai Lu
2007-07-12 5:47 ` Stefan Richter
2007-07-12 7:15 ` Cornelia Huck
2007-07-12 11:30 ` Stefan Richter [this message]
2007-07-12 15:23 ` Cornelia Huck
2007-07-12 17:59 ` [PATCH] " Yinghai Lu
2007-07-12 18:31 ` Greg KH
2007-07-12 19:06 ` Yinghai Lu
2007-07-13 3:16 ` Greg KH
2007-07-13 4:42 ` Yinghai Lu
2007-07-13 5:48 ` Cornelia Huck
2007-07-13 19:27 ` [PATCH] try parent numa_node at first before using default v2 Yinghai Lu
2007-07-10 23:52 ` [PATCH 4/5] net: show numa_node for net_device in /sys Yinghai Lu
2007-07-10 23:53 ` [PATCH 5/5] dma: use dev_to_node to get node for device in dma_alloc_pages Yinghai Lu
2007-07-23 19:30 ` Christoph Lameter
2007-07-11 0:05 ` [PATCH 2/5] net: use numa_node in net_devcice->dev instead of parent 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=469610D4.70009@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=Yinghai.Lu@Sun.COM \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=cornelia.huck@de.ibm.com \
--cc=davem@davemloft.net \
--cc=greg@kroah.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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
Powered by JetHome