aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/dsa_loop.c
diff options
context:
space:
mode:
authorPaolo Abeni <[email protected]>2017-03-30 12:03:06 +0000
committerDavid S. Miller <[email protected]>2017-03-31 03:05:24 +0000
commit6c7c98bad4883a4a8710c96b2b44de482865eb6e (patch)
tree0995daa9a97afde4b675dea6054701d04404a3ac /drivers/net/dsa/dsa_loop.c
parentMerge branch 'ibmvnic-cleanup-resource-handling' (diff)
downloadkernel-6c7c98bad4883a4a8710c96b2b44de482865eb6e.tar.gz
kernel-6c7c98bad4883a4a8710c96b2b44de482865eb6e.zip
sock: avoid dirtying sk_stamp, if possible
sock_recv_ts_and_drops() unconditionally set sk->sk_stamp for every packet, even if the SOCK_TIMESTAMP flag is not set in the related socket. If selinux is enabled, this cause a cache miss for every packet since sk->sk_stamp and sk->sk_security share the same cacheline. With this change sk_stamp is set only if the SOCK_TIMESTAMP flag is set, and is cleared for the first packet, so that the user perceived behavior is unchanged. This gives up to 5% speed-up under udp-flood with small packets. Signed-off-by: Paolo Abeni <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/dsa/dsa_loop.c')
0 files changed, 0 insertions, 0 deletions