]> 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)
commit9d2ddccb79ead2c721b26a3efe9fd147a96e34d4
tree1e57a1a007322eb1020d35ccc5236927f5148986
parent56a843af38ed841993b675c0e1f2ecd31097819e
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