igb: reduce CPU0 latency when updating statistics
authorJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 2 Aug 2018 17:13:10 +0000 (10:13 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 20 Dec 2018 19:02:06 +0000 (11:02 -0800)
commit59361316afcb08569af21e1af83e89c7051c055a
treea5c869635d88e80f836ca8b3f947d30e365fc25d
parent44a7b3b6e3a458f9549c2cc28e74ecdc470e42f1
igb: reduce CPU0 latency when updating statistics

This change is based off of the work and suggestion of Jan Jablonsky
<jan.jablonsky@thalesgroup.com>.

The Watchdog workqueue in igb driver is scheduled every 2s for each
network interface. That includes updating a statistics protected by
spinlock. Function igb_update_stats in this case will be protected
against preemption. According to number of a statistics registers
(cca 60), processing this function might cause additional cpu load
 on CPU0.

In case of statistics spinlock may be replaced with mutex, which
reduce latency on CPU0.

CC: Bernhard Kaindl <bernhard.kaindl@thalesgroup.com>
CC: Jan Jablonsky <jan.jablonsky@thalesgroup.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igb/igb.h
drivers/net/ethernet/intel/igb/igb_ethtool.c
drivers/net/ethernet/intel/igb/igb_main.c