[PATCH] node-aware skb allocation
Node-aware allocation of skbs for the receive path.
Details:
- __alloc_skb gets a new node argument and cals the node-aware
slab functions with it.
- netdev_alloc_skb passed the node number it gets from dev_to_node
to it, everyone else passes -1 (any node)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Christoph Lameter <clameter@engr.sgi.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
873481367e
commit
b30973f877
2 changed files with 10 additions and 8 deletions
|
|
@ -332,17 +332,17 @@ struct sk_buff {
|
|||
extern void kfree_skb(struct sk_buff *skb);
|
||||
extern void __kfree_skb(struct sk_buff *skb);
|
||||
extern struct sk_buff *__alloc_skb(unsigned int size,
|
||||
gfp_t priority, int fclone);
|
||||
gfp_t priority, int fclone, int node);
|
||||
static inline struct sk_buff *alloc_skb(unsigned int size,
|
||||
gfp_t priority)
|
||||
{
|
||||
return __alloc_skb(size, priority, 0);
|
||||
return __alloc_skb(size, priority, 0, -1);
|
||||
}
|
||||
|
||||
static inline struct sk_buff *alloc_skb_fclone(unsigned int size,
|
||||
gfp_t priority)
|
||||
{
|
||||
return __alloc_skb(size, priority, 1);
|
||||
return __alloc_skb(size, priority, 1, -1);
|
||||
}
|
||||
|
||||
extern struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue