event/dsw: reduce latency in low-load situations
In DSW, in case a port can't produce any events for the application to consume, the port is considered idle. To slightly reduce wall-time latency, flush the port's output buffer in case of such an empty dequeue. Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
This commit is contained in:
parent
aeb2494688
commit
3db0a0984f
@ -1242,11 +1242,11 @@ dsw_event_dequeue_burst(void *port, struct rte_event *events, uint16_t num,
|
|||||||
* seem to improve performance.
|
* seem to improve performance.
|
||||||
*/
|
*/
|
||||||
dsw_port_record_seen_events(port, events, dequeued);
|
dsw_port_record_seen_events(port, events, dequeued);
|
||||||
}
|
} else /* Zero-size dequeue means a likely idle port, and thus
|
||||||
/* XXX: Assuming the port can't produce any more work,
|
* we can afford trading some efficiency for a slightly
|
||||||
* consider flushing the output buffer, on dequeued ==
|
* reduced event wall-time latency.
|
||||||
* 0.
|
*/
|
||||||
*/
|
dsw_port_flush_out_buffers(dsw, port);
|
||||||
|
|
||||||
#ifdef DSW_SORT_DEQUEUED
|
#ifdef DSW_SORT_DEQUEUED
|
||||||
dsw_stable_sort(events, dequeued, sizeof(events[0]), dsw_cmp_event);
|
dsw_stable_sort(events, dequeued, sizeof(events[0]), dsw_cmp_event);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user