net: use skb_clone to avoid alloc_pages failure.
Subsystems (2)
PATCH 1/1 net: use skb_clone to avoid alloc_pages failure.
From: Martin Zhang <[email protected]>
1. new skb only need dst and ip address(v4 or v6).
2. skb_copy may need high order pages, which is very rare on long running server.
---
net/core/neighbour.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/neighbour.c +1 -1
@@ -857,7 +857,7 @@ static void neigh_probe(struct neighbour *neigh)struct sk_buff *skb =skb_peek_tail (&neigh->arp_queue);/* keep skb alive even if arp_queue overflows */ if (skb) - skb =skb_copy (skb,GFP_ATOMIC ); + skb =skb_clone (skb,GFP_ATOMIC );write_unlock (&neigh->lock); neigh->ops->solicit (neigh, skb);atomic_inc (&neigh->probes);
Signature · 1 line
2.1.4
Quoted 8 lines · On Tue, 2015-11-17 at 20:49 +0800, [email protected] wrote:
From: Martin Zhang <[email protected]>
1. new skb only need dst and ip address(v4 or v6).
2.skb_copymay need high order pages, which is very rare on long running server.Signed-off-by Junwei Zhang <[email protected]>Signed-off-by Martin Zhang <[email protected]>---
Quoted 12 lines · Eric Dumazet
Quoted 8 lines · On Tue, 2015-11-17 at 20:49 +0800, [email protected] wrote:
From: Martin Zhang <[email protected]>
1. new skb only need dst and ip address(v4 or v6).
2.skb_copymay need high order pages, which is very rare on long running server.Signed-off-by Junwei Zhang <[email protected]>Signed-off-by Martin Zhang <[email protected]>---
Acked-by Eric Dumazet <[email protected]>
BTW, very nice catch, thanks guys !
From: [email protected]
Date: Tue, 17 Nov 2015 20:49:30 +0800
Quoted 7 lines
From: Martin Zhang <[email protected]>
1. new skb only need dst and ip address(v4 or v6).
2.skb_copymay need high order pages, which is very rare on long running server.Signed-off-by Junwei Zhang <[email protected]>Signed-off-by Martin Zhang <[email protected]>
Applied, thanks.