Skip to contentSkip to conversation

staging: Enhance cpu load-balance octeon ethernet driver

PATCH New EUNBONG SONG 1 participant 1 message Apr 10, 2013 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/staging/octeon/ethernet-rx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/octeon/ethernet-rx.c +1 -1
index 34afc16..13f9eae 100644
@@ -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();
 		}
 
Signature · 2 lines
1.7.0.4
�淸�{.n�+돴윯돪�+%듚�깁負쪐w��{.n�+돴쪐{깸G쳺��{ay����,j�f"톒쉹��묎�z_溫(�쉸듶줷"얎�m����G쳺�◀?솳鈺�&x�~뤳턨O뺞촾퇉v�^�m����띠�◀?뻀�