forked fromtorvalds/linux
- Notifications
You must be signed in to change notification settings - Fork1
Commit6c7c98b
sock: avoid dirtying sk_stamp, if possible
sock_recv_ts_and_drops() unconditionally set sk->sk_stamp forevery packet, even if the SOCK_TIMESTAMP flag is not set in therelated socket.If selinux is enabled, this cause a cache miss for every packetsince sk->sk_stamp and sk->sk_security share the same cacheline.With this change sk_stamp is set only if the SOCK_TIMESTAMPflag is set, and is cleared for the first packet, so that the userperceived behavior is unchanged.This gives up to 5% speed-up under udp-flood with small packets.Signed-off-by: Paolo Abeni <pabeni@redhat.com>Acked-by: Eric Dumazet <edumazet@google.com>Signed-off-by: David S. Miller <davem@davemloft.net>1 parent7801a32 commit6c7c98b
2 files changed
+5
-2
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2239 | 2239 |
| |
2240 | 2240 |
| |
2241 | 2241 |
| |
| 2242 | + | |
2242 | 2243 |
| |
2243 | 2244 |
| |
2244 | 2245 |
| |
| |||
2249 | 2250 |
| |
2250 | 2251 |
| |
2251 | 2252 |
| |
2252 |
| - | |
| 2253 | + | |
2253 | 2254 |
| |
| 2255 | + | |
| 2256 | + | |
2254 | 2257 |
| |
2255 | 2258 |
| |
2256 | 2259 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2613 | 2613 |
| |
2614 | 2614 |
| |
2615 | 2615 |
| |
2616 |
| - | |
| 2616 | + | |
2617 | 2617 |
| |
2618 | 2618 |
| |
2619 | 2619 |
| |
|
0 commit comments
Comments
(0)