From: Vipin Varghese <vipin.varghese@intel.com>
To: dev@dpdk.org, harry.van.haaren@intel.com
Cc: Vipin Varghese <vipin.varghese@intel.com>
Subject: [dpdk-dev] [PATCH] event/sw: move stats code for better cache access
Date: Wed, 28 Feb 2018 01:47:18 +0530 [thread overview]
Message-ID: <1519762639-78328-1-git-send-email-vipin.varghese@intel.com> (raw)
variables 'out_pkts_total' and 'out_pkts_total' will be in registers.
Hence shifting the code after the loop, helps the update from registers.
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
---
drivers/event/sw/sw_evdev_scheduler.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/event/sw/sw_evdev_scheduler.c b/drivers/event/sw/sw_evdev_scheduler.c
index 17bd4c0..9143b93 100644
--- a/drivers/event/sw/sw_evdev_scheduler.c
+++ b/drivers/event/sw/sw_evdev_scheduler.c
@@ -541,6 +541,12 @@ sw_event_schedule(struct rte_eventdev *dev)
break;
} while ((int)out_pkts_total < sched_quanta);
+ sw->stats.tx_pkts += out_pkts_total;
+ sw->stats.rx_pkts += in_pkts_total;
+
+ sw->sched_no_iq_enqueues += (in_pkts_total == 0);
+ sw->sched_no_cq_enqueues += (out_pkts_total == 0);
+
/* push all the internal buffered QEs in port->cq_ring to the
* worker cores: aka, do the ring transfers batched.
*/
@@ -552,10 +558,4 @@ sw_event_schedule(struct rte_eventdev *dev)
sw->ports[i].cq_buf_count = 0;
}
- sw->stats.tx_pkts += out_pkts_total;
- sw->stats.rx_pkts += in_pkts_total;
-
- sw->sched_no_iq_enqueues += (in_pkts_total == 0);
- sw->sched_no_cq_enqueues += (out_pkts_total == 0);
-
}
--
2.7.4
next reply other threads:[~2018-02-27 14:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-27 20:17 Vipin Varghese [this message]
2018-03-14 13:14 ` Laatz, Kevin
2018-03-20 5:48 ` Jerin Jacob
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=1519762639-78328-1-git-send-email-vipin.varghese@intel.com \
--to=vipin.varghese@intel.com \
--cc=dev@dpdk.org \
--cc=harry.van.haaren@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).