From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: David Miller <davem@davemloft.net>
Cc: hch@infradead.org, Yinghai.Lu@Sun.COM,
shemminger@linux-foundation.org, akpm@linux-foundation.org,
ak@suse.de, greg@kroah.com, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH 2/4] net: use numa_node in net_devcice->dev instead of parent
Date: Wed, 04 Jul 2007 13:04:10 +0200 [thread overview]
Message-ID: <468B7EAA.2040903@s5r6.in-berlin.de> (raw)
In-Reply-To: <20070704.033530.105423846.davem@davemloft.net>
David Miller wrote:
> From: Christoph Hellwig <hch@infradead.org>
> Date: Wed, 4 Jul 2007 09:51:20 +0100
>
>> On Tue, Jul 03, 2007 at 05:30:51PM -0700, Yinghai Lu wrote:
...
>> > struct sk_buff *__netdev_alloc_skb(struct net_device *dev,
>> > unsigned int length, gfp_t gfp_mask)
>> > {
>> > - int node = dev->dev.parent ? dev_to_node(dev->dev.parent) : -1;
>> > + int node = dev_to_node(&dev->dev);
>>
>> This looks wrong to me unless the device model has once again changed
>> silently. When I wrote this code &dev->dev was a device allocated
>> as part of the netdevice and the parent is the pci (or whatever) device
>> that has the node information.
>
> Correct, this change is completely bogus.
I've got a question from a network driver writer's perspective: In
drivers which sit on top of a midlayer/ multi-protocol infrastructure,
should dev->dev.parent be the lowlevel's pci_dev.dev or the midlayer's
whatever_abstracted_dev.dev?
(Example: eth1394 network driver sits on top of ieee1394 = FireWire
midlayer, this sits on top of ohci1394 = PCI driver for FireWire
controllers.)
I guess it should be the lowlevel's pci_dev.dev, unless the midlayer
cares to set
set_dev_node(&midlayer_dev.dev, dev_to_node(midlayer_dev.dev.parent));
And either way, for full effect of NUMA awareness in the highlevel
network driver, the midlayer should be NUMA aware too...
--
Stefan Richter
-=====-=-=== -=== --=--
http://arcgraph.de/sr/
next prev parent reply other threads:[~2007-07-04 11:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-29 20:30 [PATCH 2/2] net: make net and forcedeth to use kmalloc_node Yinghai Lu
2007-07-03 18:58 ` Andrew Morton
2007-07-03 19:04 ` Stephen Hemminger
2007-07-03 21:28 ` Yinghai Lu
2007-07-03 21:34 ` Stephen Hemminger
2007-07-04 0:30 ` [PATCH 2/4] net: use numa_node in net_devcice->dev instead of parent Yinghai Lu
2007-07-04 8:51 ` Christoph Hellwig
2007-07-04 10:35 ` David Miller
2007-07-04 11:04 ` Stefan Richter [this message]
2007-07-04 16:54 ` Yinghai Lu
2007-07-04 0:34 ` [PATCH 3/4] net: make forcedeth to use kmalloc_node and __netdev_alloc_skb for skb allocation Yinghai Lu
2007-07-03 21:36 ` [PATCH 2/2] net: make net and forcedeth to use kmalloc_node Yinghai Lu
2007-07-04 8:49 ` Christoph Hellwig
2007-07-04 17:00 ` 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=468B7EAA.2040903@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=davem@davemloft.net \
--cc=greg@kroah.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shemminger@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
all inboxes | Powered by JetHome®