]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ixgbe: Don't bother clearing buffer memory for descriptor rings
authorAlexander Duyck <alexander.h.duyck@intel.com>
Tue, 17 Jan 2017 16:37:29 +0000 (08:37 -0800)
committerJack Vogel <jack.vogel@oracle.com>
Fri, 16 Jun 2017 06:01:23 +0000 (23:01 -0700)
commita7d6d60ea2d01f246ef0e7dc2b073816bde3d17a
tree359fa6db8ea6a9ce958a5fcf356f0ff7c31c58f4
parentfeb2f1b16629eb8fac999f36015acc2b62f4660e
ixgbe: Don't bother clearing buffer memory for descriptor rings

This patch makes it so that we don't need to bother with clearing the
memory out for the descriptor rings.  The general idea is to only free
buffers associated with buffers in use which are located between the
next_to_clean and next_to_use or next_to_alloc values.  Everything outside
of those regions can be safely ignored since they should have no buffers
associated with them.

The advantage to doing things this way is that is should speed up bring-up
and tear-down of the rings.  Specifically we can avoid the 512 or more
cycles required to memset the rings in tear-down.  In the bring-up phase we
then clear the memory as a part of initialization.  The general idea is
that the clearing in initialization can act as a prefetch of sorts for the
buffer info structures so they are in the local CPU when we go to populate
them.  This should help to improve overall time needed to perform a
suspend/resume.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 26242766
(cherry picked from commit ffed21bcee7a544f99a9c9b18c23b361a0b1e476)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Ethan Zhao <ethan.zhao@oracle.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c