]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ixgbe: Copybreak sooner to avoid get_page/put_page and offset change overhead
authorAlexander Duyck <alexander.h.duyck@intel.com>
Fri, 20 Jul 2012 08:08:39 +0000 (08:08 +0000)
committerPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Thu, 16 Aug 2012 22:44:39 +0000 (15:44 -0700)
commitcf3fe7aca03e14db107d649c5699a48bec054583
treeaf449838adf46e592b93827dd87ac6586fa41909
parent19861ce24f2ea9d9db7b96814de9ca8d522cbe40
ixgbe: Copybreak sooner to avoid get_page/put_page and offset change overhead

This change makes it so that if only the first 256 bytes of a buffer are
used we just copy the data out and leave the offset and page count
unchanged. There are multiple advantages to this. First it allows us to
reuse the page much more in the case of pages larger than 4K. It also
allows us to avoid some expensive atomic operations in the form of
get_page/put_page. In perf I have seen CPU utilization for put_page drop
from 3.5% to 1.8% as a result of this patch when doing small packet routing,
and packet rates increased by about 3%.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c