[<prev] [next>] [day] [month] [year] [list]
Message-id: <3910056.318101365589004261.JavaMail.weblogic@epml02>
Date: Wed, 10 Apr 2013 10:16:44 +0000 (GMT)
From: EUNBONG SONG <eunb.song@...sung.com>
To: david.daney@...ium.com
Cc: linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org
Subject: [PATCH] staging: Enhance cpu load-balance octeon ethernet driver
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.song@...sung.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
Powered by blists - more mailing lists