* [PATCH] staging: Enhance cpu load-balance octeon ethernet driver
@ 2013-04-10 10:16 EUNBONG SONG
0 siblings, 0 replies; only message in thread
From: EUNBONG SONG @ 2013-04-10 10:16 UTC (permalink / raw)
To: david.daney; +Cc: linux-kernel, gregkh
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=euc-kr, Size: 1411 bytes --]
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@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
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-04-10 10:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-10 10:16 [PATCH] staging: Enhance cpu load-balance octeon ethernet driver EUNBONG SONG
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox