Thread (22 messages) 22 messages, 4 authors, 2008-12-18

Re: [PATCH] net: release skb->dst in sock_queue_rcv_skb()

From: David Miller <davem@davemloft.net>
Date: 2008-11-26 02:04:05

From: Eric Dumazet <redacted>
Date: Wed, 26 Nov 2008 01:00:30 +0100
In the meantime, what do you think of the following patch ?

[PATCH] net: release skb->dst in sock_queue_rcv_skb()

When queuing a skb to sk->sk_receive_queue, we can release its dst, not
anymore needed.
Since current cpu did the dst_hold(), refcount is probably still hot
int this cpu caches.

This avoids readers to access the original dst to decrement its refcount,
possibly a long time after packet reception. This should speedup UDP
and RAW receive path.

Signed-off-by: Eric Dumazet <redacted>
I guess the idea is that if we release quickly we'll not have
to reget the cacheline in owned state.

I wonder if this might actually slightly hurt loads like tbench where
we are banging on the refcnt constantly on every cpu anyways.

Can you do a quick check?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help