public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: EUNBONG SONG <eunb.song@samsung.com>
To: david.daney@cavium.com
Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org
Subject: [PATCH] staging: Enhance cpu load-balance octeon ethernet driver
Date: Wed, 10 Apr 2013 10:16:44 +0000 (GMT)	[thread overview]
Message-ID: <3910056.318101365589004261.JavaMail.weblogic@epml02> (raw)

[-- 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¥

                 reply	other threads:[~2013-04-10 10:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3910056.318101365589004261.JavaMail.weblogic@epml02 \
    --to=eunb.song@samsung.com \
    --cc=david.daney@cavium.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox