lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 27 Sep 2014 09:46:25 -0700 From: Eric Dumazet <eric.dumazet@...il.com> To: Eric Dumazet <edumazet@...gle.com> Cc: "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org, Yuchung Cheng <ycheng@...gle.com>, Neal Cardwell <ncardwell@...gle.com>, Christoph Paasch <christoph.paasch@...ouvain.be> Subject: Re: [PATCH v3 net-next 3/3] tcp: better TCP_SKB_CB layout to reduce cache line misses On Thu, 2014-09-25 at 13:14 -0700, Eric Dumazet wrote: > TCP maintains lists of skb in write queue, and in receive queues > (in order and out of order queues) > > Scanning these lists both in input and output path usually requires > access to skb->next, TCP_SKB_CB(skb)->seq, and TCP_SKB_CB(skb)->end_seq > > These fields are currently in two different cache lines, meaning we > waste lot of memory bandwidth when these queues are big and flows > have either packet drops or packet reorders. > > We can move TCP_SKB_CB(skb)->header at the end of TCP_SKB_CB, because > this header is not used in fast path. This allows TCP to search much faster > in the skb lists. > > Even with regular flows, we save one cache line miss in fast path. > > Thanks to Christoph Paasch for noticing we need to cleanup > skb->cb[] (IPCB/IP6CB) before entering IP stack in tx path, > and that I forgot IPCB use in tcp_v4_hnd_req() and tcp_v4_save_options(). > > Signed-off-by: Eric Dumazet <edumazet@...gle.com> > --- Silly me, I'll send a v4, sorry for the noise net/ipv4/tcp_ipv4.c: In function 'tcp_v4_save_options': net/ipv4/tcp_ipv4.c:889:33: warning: initialization from incompatible pointer type [enabled by default] net/ipv4/tcp_ipv4.c: In function 'tcp_v4_hnd_req': net/ipv4/tcp_ipv4.c:1432:43: warning: passing argument 3 of 'cookie_v4_check' from incompatible pointer type [enabled by default] In file included from net/ipv4/tcp_ipv4.c:69:0: include/net/tcp.h:474:14: note: expected 'struct ip_options *' but argument is of type 'struct inet_skb_parm *' -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists