]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit7c04e63d689db588ee339e61ecef469e1ed325a6
treea5c869635d88e80f836ca8b3f947d30e365fc25d
parent16460d594c0139ef3b4578f601fdc0663407f5d1
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