]> git.baikalelectronics.ru Git - kernel.git/commit
ice: Introduce bulk update for page count
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Wed, 13 Feb 2019 18:51:04 +0000 (10:51 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 25 Mar 2019 16:33:13 +0000 (09:33 -0700)
commitcb34085dc90880b8d7344f2d9de793cd9af3fedf
tree0a7453ee71aa40c532b8756137387483db00910c
parent40f36137e45bf343c59e044e631033ace287a943
ice: Introduce bulk update for page count

{get,put}_page are atomic operations which we use for page count
handling. The current logic for refcount handling is that we increment
it when passing a skb with the data from the first half of page up to
netstack and recycle the second half of page. This operation protects us
from losing a page since the network stack can decrement the refcount of
page from skb.

The performance can be gently improved by doing the bulk updates of
refcount instead of doing it one by one. During the buffer initialization,
maximize the page's refcount and don't allow the refcount to become
less than two.

Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_txrx.c
drivers/net/ethernet/intel/ice/ice_txrx.h