mirror of https://gitee.com/openkylin/linux.git
0bcd952fee
While reviewing code, I noticed that Eric Dumazet recommends that drivers check the return code of napi_complete_done, and use that to decide to enable interrupts or not when exiting poll. One of the Intel drivers was already fixed (ixgbe). Upon looking at the Intel drivers as a whole, we are handling our polling and NAPI exit in a few different ways based on whether we have multiqueue and whether we have Tx cleanup included. Several drivers had the bug of exiting NAPI with return 0, which appears to mess up the accounting in the stack. Consolidate all the NAPI routines to do best known way of exiting and to just mostly look like each other. 1) check return code of napi_complete_done to control interrupt enable 2) return the actual amount of work done. 3) return budget immediately if need NAPI poll again Tested the changes on e1000e with a high interrupt rate set, and it shows about an 8% reduction in the CPU utilization when busy polling because we aren't re-enabling interrupts when we're about to be polled. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
||
---|---|---|
.. | ||
Makefile | ||
i40e_adminq.c | ||
i40e_adminq.h | ||
i40e_adminq_cmd.h | ||
iavf.h | ||
iavf_alloc.h | ||
iavf_client.c | ||
iavf_client.h | ||
iavf_common.c | ||
iavf_devids.h | ||
iavf_ethtool.c | ||
iavf_main.c | ||
iavf_osdep.h | ||
iavf_prototype.h | ||
iavf_register.h | ||
iavf_status.h | ||
iavf_trace.h | ||
iavf_txrx.c | ||
iavf_txrx.h | ||
iavf_type.h | ||
iavf_virtchnl.c |