Re: [PATCH] net: reduce number of reference taken on sk_refcnt
From: David Miller <davem@davemloft.net>
Date: 2009-05-09 20:36:15
From: Eric Dumazet <redacted> Date: Sat, 09 May 2009 14:13:59 +0200
David Miller a écrit :quoted
From: Eric Dumazet <redacted> Date: Fri, 08 May 2009 17:12:39 +0200quoted
For example, we can avoid the dst_release() cache miss if this is done in start_xmit(), and not later in TX completion while freeing skb. I tried various patches in the past but unfortunatly it seems only safe way to do this is in the driver xmit itself, not in core network stack. This would need many patches, one for each driver.There might be a way around having to hit every driver. The case we can't muck with is when the route will be used. Devices which create this kind of situation can be marked with a flag bit in struct netdevice. If that flag bit isn't set, you can drop the DST in dev_hard_start_xmit().Yes, this is a possibility, I'll think about it, thank you. I'll have to recall which devices would need this flag (loopback for sure)..
Another idea is to invert the flag, and set it in places such as alloc_etherdev*(). This might speed up getting coverage for the most obvious cases.