Re: [PATCH net-next] ipv4: PKTINFO doesnt need dst reference |
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
From: Eric Dumazet <eric.dumazet@xxxxxxxxx>
Date: Wed, 09 Nov 2011 18:24:35 +0100
> [PATCH net-next] ipv4: IP_PKTINFO doesnt need dst reference
>
> When a socket uses IP_PKTINFO notifications, we currently force a dst
> reference for each received skb. Reader has to access dst to get needed
> information (rt_iif & rt_spec_dst) and must release dst reference.
>
> We also forced a dst reference if skb was put in socket backlog, even
> without IP_PKTINFO handling. This happens under stress/load.
>
> We can instead store the needed information in skb->cb[], so that only
> softirq handler really access dst, improving cache hit ratios.
>
> This removes two atomic operations per packet, and false sharing as
> well.
>
> On a benchmark using a mono threaded receiver (doing only recvmsg()
> calls), I can reach 720.000 pps instead of 570.000 pps.
>
> IP_PKTINFO is typically used by DNS servers, and any multihomed aware
> UDP application.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@xxxxxxxxx>
Looks good, if it compiles I'll push it out to net-next :-)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Kernel Discussion]
[Ethernet Bridging]
[Linux Wireless Networking]
[Linux Bluetooth Networking]
[Linux Networking Users]
[VLAN]
[Git]
[IETF Annouce]
[Linux Assembly]
[Security]
[Bugtraq]
[Photo]
[Singles Social Networking]
[Yosemite Information]
[MIPS Linux]
[ARM Linux Kernel]
[ARM Linux]
[Linux Virtualization]
[Linux Security]
[Linux IDE]
[Linux RAID]
[Linux SCSI]
[Free Dating]