1. 02 10月, 2015 2 次提交
  2. 30 9月, 2015 37 次提交
  3. 29 9月, 2015 1 次提交
    • J
      net: help compiler generate better code in eth_get_headlen · 8a4683a5
      Jesper Dangaard Brouer 提交于
      Noticed that the compiler (gcc version 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC))
      generated suboptimal assembler code in eth_get_headlen().
      
      This early return coding style is usually not an issue, on super scalar CPUs,
      but the compiler choose to put the return statement after this very unlikely
      branch, thus creating larger jump down to the likely code path.
      
      Performance wise, I could measure slightly less L1-icache-load-misses
      and less branch-misses, and an improvement of 1 nanosec with an IP-forwarding
      use-case with 257 bytes packets with ixgbe (CPU i7-4790K @ 4.00GHz).
      Signed-off-by: NJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8a4683a5