]> git.baikalelectronics.ru Git - kernel.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)
commitd2107d2687fd6937ad5cf1a2eb71711dcda16598
treece54f4695fd3bc8b400dd28ed965de9cfa202cd6
parent702885edd9e0156d59360785bd01ee6fe005c7d6
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