From: Christoph Hellwig <hch@infradead.org>
To: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: Christoph Hellwig <hch@infradead.org>,
David Miller <davem@davemloft.net>,
arnd@arndb.de, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 1/1] network memory allocator.
Date: Wed, 16 Aug 2006 10:38:37 +0100 [thread overview]
Message-ID: <20060816093837.GA11096@infradead.org> (raw)
In-Reply-To: <20060816093159.GA31882@2ka.mipt.ru>
On Wed, Aug 16, 2006 at 01:32:02PM +0400, Evgeniy Polyakov wrote:
> On Wed, Aug 16, 2006 at 10:10:29AM +0100, Christoph Hellwig (hch@infradead.org) wrote:
> > On Wed, Aug 16, 2006 at 02:05:03AM -0700, David Miller wrote:
> > > From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
> > > Date: Wed, 16 Aug 2006 13:00:31 +0400
> > >
> > > > So I would like to know how to determine which node should be used for
> > > > allocation. Changes of __get_user_pages() to alloc_pages_node() are
> > > > trivial.
> > >
> > > netdev_alloc_skb() knows the netdevice, and therefore you can
> > > obtain the "struct device;" referenced inside of the netdev,
> > > and therefore you can determine the node using the struct
> > > device.
> >
> > It's not that easy unfortunately. I did what you describe above in my
> > first prototype but then found out the hard way that the struct device
> > in the netdevice can be a non-pci one, e.g. for pcmcia. Im that case
> > the kernel will crash on you becuase you can only get the node infortmation
> > for pci devices. My current patchkit adds an "int node" member to struct
> > net_device instead. I can repost the patchkit ontop of -mm (which is
> > the required slab memory leak tracking changes) if anyone cares.
>
> Can we check device->bus_type or device->driver->bus against
> &pci_bus_type for that?
We could, but I'd rather waste 4 bytes in struct net_device than having
such ugly warts in common code.
WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@infradead.org>
To: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: Christoph Hellwig <hch@infradead.org>,
David Miller <davem@davemloft.net>,
arnd@arndb.de, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 1/1] network memory allocator.
Date: Wed, 16 Aug 2006 10:38:37 +0100 [thread overview]
Message-ID: <20060816093837.GA11096@infradead.org> (raw)
In-Reply-To: <20060816093159.GA31882@2ka.mipt.ru>
On Wed, Aug 16, 2006 at 01:32:02PM +0400, Evgeniy Polyakov wrote:
> On Wed, Aug 16, 2006 at 10:10:29AM +0100, Christoph Hellwig (hch@infradead.org) wrote:
> > On Wed, Aug 16, 2006 at 02:05:03AM -0700, David Miller wrote:
> > > From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
> > > Date: Wed, 16 Aug 2006 13:00:31 +0400
> > >
> > > > So I would like to know how to determine which node should be used for
> > > > allocation. Changes of __get_user_pages() to alloc_pages_node() are
> > > > trivial.
> > >
> > > netdev_alloc_skb() knows the netdevice, and therefore you can
> > > obtain the "struct device;" referenced inside of the netdev,
> > > and therefore you can determine the node using the struct
> > > device.
> >
> > It's not that easy unfortunately. I did what you describe above in my
> > first prototype but then found out the hard way that the struct device
> > in the netdevice can be a non-pci one, e.g. for pcmcia. Im that case
> > the kernel will crash on you becuase you can only get the node infortmation
> > for pci devices. My current patchkit adds an "int node" member to struct
> > net_device instead. I can repost the patchkit ontop of -mm (which is
> > the required slab memory leak tracking changes) if anyone cares.
>
> Can we check device->bus_type or device->driver->bus against
> &pci_bus_type for that?
We could, but I'd rather waste 4 bytes in struct net_device than having
such ugly warts in common code.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2006-08-16 9:38 UTC|newest]
Thread overview: 104+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-14 11:04 [PATCH 1/1] network memory allocator Evgeniy Polyakov
2006-08-14 11:04 ` Evgeniy Polyakov
2006-08-14 11:22 ` David Miller
2006-08-14 11:22 ` David Miller, Evgeniy Polyakov
2006-08-14 11:32 ` Evgeniy Polyakov
2006-08-14 11:32 ` Evgeniy Polyakov
2006-08-14 11:40 ` Andi Kleen
2006-08-14 11:40 ` Andi Kleen
2006-08-14 11:46 ` Evgeniy Polyakov
2006-08-14 11:46 ` Evgeniy Polyakov
2006-08-14 12:07 ` Keith Owens
2006-08-14 12:07 ` Keith Owens
2006-08-14 12:20 ` Evgeniy Polyakov
2006-08-14 12:20 ` Evgeniy Polyakov
2006-08-14 17:42 ` Rick Jones
2006-08-14 17:42 ` Rick Jones
2006-08-14 20:15 ` David Miller
2006-08-14 20:15 ` David Miller, Rick Jones
2006-08-14 12:25 ` Peter Zijlstra
2006-08-14 12:25 ` Peter Zijlstra
2006-08-14 12:35 ` Evgeniy Polyakov
2006-08-14 12:35 ` Evgeniy Polyakov
2006-08-14 12:38 ` Evgeniy Polyakov
2006-08-14 12:38 ` Evgeniy Polyakov
2006-08-15 10:55 ` Peter Zijlstra
2006-08-15 10:55 ` Peter Zijlstra
2006-08-15 11:26 ` Evgeniy Polyakov
2006-08-15 11:26 ` Evgeniy Polyakov
2006-08-15 12:03 ` Peter Zijlstra
2006-08-15 12:03 ` Peter Zijlstra
2006-08-15 12:34 ` Evgeniy Polyakov
2006-08-15 12:34 ` Evgeniy Polyakov
2006-08-15 13:49 ` Peter Zijlstra
2006-08-15 13:49 ` Peter Zijlstra
2006-08-15 14:15 ` Evgeniy Polyakov
2006-08-15 14:15 ` Evgeniy Polyakov
2006-08-15 14:48 ` Peter Zijlstra
2006-08-15 14:48 ` Peter Zijlstra
2006-08-15 15:05 ` Evgeniy Polyakov
2006-08-15 15:05 ` Evgeniy Polyakov
2006-08-15 15:07 ` Evgeniy Polyakov
2006-08-15 15:07 ` Evgeniy Polyakov
2006-08-15 17:42 ` Peter Zijlstra
2006-08-15 17:42 ` Peter Zijlstra
2006-08-15 17:49 ` Evgeniy Polyakov
2006-08-15 17:49 ` Evgeniy Polyakov
2006-08-16 2:52 ` Bill Fink
2006-08-16 2:52 ` Bill Fink
2006-08-16 5:38 ` Evgeniy Polyakov
2006-08-16 5:38 ` Evgeniy Polyakov
2006-08-14 17:46 ` Rick Jones
2006-08-14 17:46 ` Rick Jones
2006-08-14 19:42 ` Evgeniy Polyakov
2006-08-14 19:42 ` Evgeniy Polyakov
2006-08-15 7:27 ` Andrew Morton
2006-08-15 7:27 ` Andrew Morton
2006-08-15 8:08 ` Andi Kleen
2006-08-15 8:08 ` Andi Kleen
2006-08-15 10:02 ` Evgeniy Polyakov
2006-08-15 10:02 ` Evgeniy Polyakov
2006-08-15 10:27 ` David Miller
2006-08-15 10:27 ` David Miller, Evgeniy Polyakov
2006-08-15 9:20 ` Evgeniy Polyakov
2006-08-15 9:20 ` Evgeniy Polyakov
2006-08-15 20:21 ` Arnd Bergmann
2006-08-16 5:35 ` Evgeniy Polyakov
2006-08-16 8:48 ` Christoph Hellwig
2006-08-16 8:48 ` Christoph Hellwig
2006-08-16 9:00 ` Evgeniy Polyakov
2006-08-16 9:00 ` Evgeniy Polyakov
2006-08-16 9:05 ` David Miller
2006-08-16 9:05 ` David Miller, Evgeniy Polyakov
2006-08-16 9:10 ` Christoph Hellwig
2006-08-16 9:10 ` Christoph Hellwig
2006-08-16 9:32 ` Evgeniy Polyakov
2006-08-16 9:32 ` Evgeniy Polyakov
2006-08-16 9:38 ` Christoph Hellwig [this message]
2006-08-16 9:38 ` Christoph Hellwig
2006-08-16 9:40 ` David Miller
2006-08-16 9:40 ` David Miller, Christoph Hellwig
2006-08-16 9:44 ` Christoph Hellwig
2006-08-16 9:44 ` Christoph Hellwig
2006-08-16 9:42 ` Christoph Hellwig
2006-08-16 9:42 ` Christoph Hellwig
2006-08-16 11:27 ` Arnd Bergmann
2006-08-16 11:27 ` Arnd Bergmann
2006-08-16 12:00 ` Evgeniy Polyakov
2006-08-16 12:00 ` Evgeniy Polyakov
2006-08-16 12:25 ` Andi Kleen
2006-08-16 12:25 ` Andi Kleen
2006-08-18 2:25 ` Christoph Lameter
2006-08-18 2:25 ` Christoph Lameter
2006-08-18 9:29 ` Andi Kleen
2006-08-18 9:29 ` Andi Kleen
2006-08-18 8:51 ` David Miller
2006-08-18 8:51 ` David Miller, Andi Kleen
2006-08-18 17:04 ` Christoph Lameter
2006-08-18 17:04 ` Christoph Lameter
2006-08-16 7:51 ` [PATCH2 " Evgeniy Polyakov
2006-08-16 7:51 ` Evgeniy Polyakov
2006-08-16 16:57 ` Stephen Hemminger
2006-08-16 16:57 ` Stephen Hemminger
2006-08-16 19:27 ` Evgeniy Polyakov
2006-08-16 19:27 ` Evgeniy Polyakov
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=20060816093837.GA11096@infradead.org \
--to=hch@infradead.org \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=johnpol@2ka.mipt.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=netdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.