Currently, CPU for RX napi handler is scheduled when backlog packet count is 
greater than budget * cores_in_use.
If more cpus are used for RX napi handler, there is low possibility backlog 
packet count is greater than budget * cores_in_use.
This patch makes CPU for RX napi handler is scheduled when backlog packet count 
is greater than budget.
I tested with patch and the result is more cpu is scheduled in traffic 
congestion situation.

Signed-off-by: EunBong Song <eunb.s...@samsung.com>
---
 drivers/staging/octeon/ethernet-rx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/octeon/ethernet-rx.c 
b/drivers/staging/octeon/ethernet-rx.c
index 34afc16..13f9eae 100644
--- a/drivers/staging/octeon/ethernet-rx.c
+++ b/drivers/staging/octeon/ethernet-rx.c
@@ -300,7 +300,7 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int 
budget)
                        int cores_in_use = core_state.baseline_cores - 
atomic_read(&core_state.available_cores);
                        counts.u64 = 
cvmx_read_csr(CVMX_POW_WQ_INT_CNTX(pow_receive_group));
                        backlog = counts.s.iq_cnt + counts.s.ds_cnt;
-                       if (backlog > budget * cores_in_use && napi != NULL)
+                       if (backlog > budget && napi != NULL)
                                cvm_oct_enable_one_cpu();
                }
 
-- 
1.7.0.4

Reply via email to