* [dpdk-dev] [PATCH] event/sw: perform partial burst enqueues
@ 2018-03-08 22:55 Gage Eads
2018-03-12 14:55 ` [dpdk-dev] [PATCH v2] " Gage Eads
0 siblings, 1 reply; 4+ messages in thread
From: Gage Eads @ 2018-03-08 22:55 UTC (permalink / raw)
To: dev; +Cc: jerin.jacob, harry.van.haaren
Previously, the sw event adapter would enqueue either all or no events,
depending on if enough inflight credits were available for the new events
in the burst. If a port is enqueueing a large burst (i.e. a multiple of the
credit update quanta), this can result in suboptimal performance, and
requires an understanding of the sw PMD implementation (in particular, its
credit scheme) to tune an application's burst size.
This affects software that enqueues large bursts of new events, such as the
ethernet event adapter which uses a 128-deep event buffer, when the input
packet rate is sufficiently high.
This change makes the sw PMD enqueue as many events as it has credits, if
there are any new events in the burst.
Signed-off-by: Gage Eads <gage.eads@intel.com>
---
drivers/event/sw/sw_evdev_worker.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/event/sw/sw_evdev_worker.c b/drivers/event/sw/sw_evdev_worker.c
index 67151f7..063b919 100644
--- a/drivers/event/sw/sw_evdev_worker.c
+++ b/drivers/event/sw/sw_evdev_worker.c
@@ -77,8 +77,10 @@ sw_event_enqueue_burst(void *port, const struct rte_event ev[], uint16_t num)
rte_atomic32_add(&sw->inflights, credit_update_quanta);
p->inflight_credits += (credit_update_quanta);
- if (p->inflight_credits < new)
- return 0;
+ /* If there are fewer inflight credits than new events, limit
+ * the number of enqueued events.
+ */
+ num = (p->inflight_credits < new) ? p->inflight_credits : new;
}
for (i = 0; i < num; i++) {
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH v2] event/sw: perform partial burst enqueues
2018-03-08 22:55 [dpdk-dev] [PATCH] event/sw: perform partial burst enqueues Gage Eads
@ 2018-03-12 14:55 ` Gage Eads
2018-03-13 14:08 ` Van Haaren, Harry
0 siblings, 1 reply; 4+ messages in thread
From: Gage Eads @ 2018-03-12 14:55 UTC (permalink / raw)
To: dev; +Cc: jerin.jacob, harry.van.haaren
Previously, the sw PMD would enqueue either all or no events, depending on
if enough inflight credits were available for the new events in the burst.
If a port is enqueueing a large burst (i.e. a multiple of the credit update
quanta), this can result in suboptimal performance, and requires an
understanding of the sw PMD implementation (in particular, its credit
scheme) to tune an application's burst size.
This affects software that enqueues large bursts of new events, such as the
ethernet event adapter which uses a 128-deep event buffer, when the input
packet rate is sufficiently high.
This change makes the sw PMD enqueue as many events as it has credits, if
there are any new events in the burst.
Signed-off-by: Gage Eads <gage.eads@intel.com>
---
v2: fix commit message bug ("sw event adapter" -> "sw PMD")
drivers/event/sw/sw_evdev_worker.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/event/sw/sw_evdev_worker.c b/drivers/event/sw/sw_evdev_worker.c
index 67151f7..063b919 100644
--- a/drivers/event/sw/sw_evdev_worker.c
+++ b/drivers/event/sw/sw_evdev_worker.c
@@ -77,8 +77,10 @@ sw_event_enqueue_burst(void *port, const struct rte_event ev[], uint16_t num)
rte_atomic32_add(&sw->inflights, credit_update_quanta);
p->inflight_credits += (credit_update_quanta);
- if (p->inflight_credits < new)
- return 0;
+ /* If there are fewer inflight credits than new events, limit
+ * the number of enqueued events.
+ */
+ num = (p->inflight_credits < new) ? p->inflight_credits : new;
}
for (i = 0; i < num; i++) {
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] event/sw: perform partial burst enqueues
2018-03-12 14:55 ` [dpdk-dev] [PATCH v2] " Gage Eads
@ 2018-03-13 14:08 ` Van Haaren, Harry
2018-03-20 7:01 ` Jerin Jacob
0 siblings, 1 reply; 4+ messages in thread
From: Van Haaren, Harry @ 2018-03-13 14:08 UTC (permalink / raw)
To: Eads, Gage, dev; +Cc: jerin.jacob
> From: Eads, Gage
> Sent: Monday, March 12, 2018 2:55 PM
> To: dev@dpdk.org
> Cc: jerin.jacob@caviumnetworks.com; Van Haaren, Harry
> <harry.van.haaren@intel.com>
> Subject: [PATCH v2] event/sw: perform partial burst enqueues
>
> Previously, the sw PMD would enqueue either all or no events, depending on
> if enough inflight credits were available for the new events in the burst.
> If a port is enqueueing a large burst (i.e. a multiple of the credit update
> quanta), this can result in suboptimal performance, and requires an
> understanding of the sw PMD implementation (in particular, its credit
> scheme) to tune an application's burst size.
>
> This affects software that enqueues large bursts of new events, such as the
> ethernet event adapter which uses a 128-deep event buffer, when the input
> packet rate is sufficiently high.
>
> This change makes the sw PMD enqueue as many events as it has credits, if
> there are any new events in the burst.
>
> Signed-off-by: Gage Eads <gage.eads@intel.com>
Agree that making forward progress by enqueuing what we have credits for
makes sense for the application.
No performance degradation here, thanks for the patch:
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] event/sw: perform partial burst enqueues
2018-03-13 14:08 ` Van Haaren, Harry
@ 2018-03-20 7:01 ` Jerin Jacob
0 siblings, 0 replies; 4+ messages in thread
From: Jerin Jacob @ 2018-03-20 7:01 UTC (permalink / raw)
To: Van Haaren, Harry; +Cc: Eads, Gage, dev
-----Original Message-----
> Date: Tue, 13 Mar 2018 14:08:20 +0000
> From: "Van Haaren, Harry" <harry.van.haaren@intel.com>
> To: "Eads, Gage" <gage.eads@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
> CC: "jerin.jacob@caviumnetworks.com" <jerin.jacob@caviumnetworks.com>
> Subject: RE: [PATCH v2] event/sw: perform partial burst enqueues
>
> > From: Eads, Gage
> > Sent: Monday, March 12, 2018 2:55 PM
> > To: dev@dpdk.org
> > Cc: jerin.jacob@caviumnetworks.com; Van Haaren, Harry
> > <harry.van.haaren@intel.com>
> > Subject: [PATCH v2] event/sw: perform partial burst enqueues
> >
> > Previously, the sw PMD would enqueue either all or no events, depending on
> > if enough inflight credits were available for the new events in the burst.
> > If a port is enqueueing a large burst (i.e. a multiple of the credit update
> > quanta), this can result in suboptimal performance, and requires an
> > understanding of the sw PMD implementation (in particular, its credit
> > scheme) to tune an application's burst size.
> >
> > This affects software that enqueues large bursts of new events, such as the
> > ethernet event adapter which uses a 128-deep event buffer, when the input
> > packet rate is sufficiently high.
> >
> > This change makes the sw PMD enqueue as many events as it has credits, if
> > there are any new events in the burst.
> >
> > Signed-off-by: Gage Eads <gage.eads@intel.com>
>
>
> Agree that making forward progress by enqueuing what we have credits for
> makes sense for the application.
>
> No performance degradation here, thanks for the patch:
>
> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Applied to dpdk-next-eventdev/master. Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-03-20 7:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-08 22:55 [dpdk-dev] [PATCH] event/sw: perform partial burst enqueues Gage Eads
2018-03-12 14:55 ` [dpdk-dev] [PATCH v2] " Gage Eads
2018-03-13 14:08 ` Van Haaren, Harry
2018-03-20 7:01 ` Jerin Jacob
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).