]> git.karo-electronics.de Git - linux-beck.git/commit
net: cacheline adjust struct inet_frags for better frag performance
authorJesper Dangaard Brouer <brouer@redhat.com>
Mon, 28 Jan 2013 23:44:37 +0000 (23:44 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Jan 2013 18:36:23 +0000 (13:36 -0500)
commit5f8e1e8b767bdb8e471d4f49612b88c606f8811e
treece54f4695fd3bc8b400dd28ed965de9cfa202cd6
parentcd39a7890aed7433beb3188c7ad8591e260ebf10
net: cacheline adjust struct inet_frags for better frag performance

The globally shared rwlock, of struct inet_frags, shares
cacheline with the 'rnd' number, which is used by the hash
calculations.  Fix this, as this obviously is a bad idea, as
unnecessary cache-misses will occur when accessing the 'rnd'
number.

Also small note that, moving function ptr (*match) up in struct,
is to avoid it lands on the next cacheline (on 64-bit).

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/inet_frag.h