]> git.baikalelectronics.ru Git - kernel.git/commit
i40e/i40evf: avoid atomics
authorMitch Williams <mitch.a.williams@intel.com>
Fri, 15 Jan 2016 22:33:15 +0000 (14:33 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 18 Feb 2016 07:11:07 +0000 (23:11 -0800)
commita99c4c99990f7924db94a723c14f2ffba574805f
tree1e57a1a007322eb1020d35ccc5236927f5148986
parent185f11a4d2e33ac4cb5134f4ef106e45f990f425
i40e/i40evf: avoid atomics

In the case where we have a page fully used by receive data, we need to
release the page fully to the stack. Instead of calling get_page (which
increments the page count) followed by free_page (which decrements the
page count), just donate our reference to the stack. Although this
donation is not tax deductible, it does allow us to avoid two very
expensive atomic operations that reverse each other.

Change-ID: If70739792d5748995fc175ec92ac2171ed4ad8fc
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.c
drivers/net/ethernet/intel/i40evf/i40e_txrx.c