]> git.baikalelectronics.ru Git - kernel.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)
commitadb799de9c72aeae639ab1164057743eab9cca5a
treeaf449838adf46e592b93827dd87ac6586fa41909
parent650c539820aba4db644ada6e812beef15b2655a3
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