On 4/3/19, 12:02 PM, "Mattias Rönnblom" <mattias.ronnb...@ericsson.com> wrote:
On 2019-04-03 20:36, Venky Venkatesh wrote:
>
>
> On 4/3/19, 11:34 AM, "Mattias Rönnblom" <mattias.ronnb...@ericsson.com>
wrote:
>
> On 2019-04-03 20:17, Venky Venkatesh wrote:
> > Hi,
> > I am using the DSW code from 18.11 with the default settings for
all the #defines. Here are some more details:
> > I have an 8 port system with 1 queue.
> > All ports can inject events. Port 0 and 7 inject events rarely.
> > Ports 1-6 are linked to the queue and hence dequeue events.
> >
> > I see that in steady state the total number enqueues into the
system is much greater than the total number of dequeues.
> > eventdev deq#: 1948491 enq#: 1949007
> >
>
> If you have more enqueues than dequeues, it means there are events
in
> flight in the scheduler. In the above case, it's roughly 516 events,
> which sounds perfectly healthy and normal. I say roughly, because
> there's no way to take a consistent, global snapshot of all xstats
counters.
>
> [VV]: This is in steady state i.e. there are no more events being
injected into the system. So shouldn’t everything get drained out at some point?
>
Assuming appropriate application behavior, sure, of course.
Events in flight are either in the output buffer on the producer port,
or the input ring on the consumer.
Inappropriate behavior would be if any port (producer, consumer or
producer+consumer) is left unattended (i.e. no enqueue or dequeue
operation is performed).
[VV]: I am pasting the original data again below. If about 516 events are
inflight, atleast a few should show up in one of the data structures that you
refer to -- but they don’t as seen below. Isn't that odd? Do you have any other
places I can look -- there were no migrations too to look at some other
transient buffers.
Below are the counters:
[root@PA-VM-venky ~]# cat y
dev_credits_on_loan: 883
------ port 0 --------
port_0_new_enqueued: 125
port_0_forward_enqueued: 0
port_0_release_enqueued: 0
port_0_queue_0_enqueued: 125
port_0_dequeued: 0
port_0_queue_0_dequeued: 0
port_0_migrations: 0
Below are the data structure values:
(gdb) p ((struct dsw_evdev *)rte_eventdevs[0].data->dev_private)->ports[0]->out_buffer_len
$2 = {0 <repeats 64 times>}
(gdb) p ((struct dsw_evdev
*)rte_eventdevs[0].data->dev_private)->ports[1]->out_buffer_len
$3 = {0 <repeats 64 times>}
(gdb) p ((struct dsw_evdev
*)rte_eventdevs[0].data->dev_private)->ports[2]->out_buffer_len
$4 = {0 <repeats 64 times>}
(gdb) p ((struct dsw_evdev
*)rte_eventdevs[0].data->dev_private)->ports[3]->out_buffer_len
$5 = {0 <repeats 64 times>}
(gdb) p ((struct dsw_evdev
*)rte_eventdevs[0].data->dev_private)->ports[4]->out_buffer_len
$6 = {0 <repeats 64 times>}
(gdb) p ((struct dsw_evdev
*)rte_eventdevs[0].data->dev_private)->ports[5]->out_buffer_len
$7 = {0 <repeats 64 times>}
(gdb) p ((struct dsw_evdev
*)rte_eventdevs[0].data->dev_private)->ports[6]->out_buffer_len
$8 = {0 <repeats 64 times>}
(gdb) p ((struct dsw_evdev
*)rte_eventdevs[0].data->dev_private)->ports[7]->out_buffer_len
$9 = {0 <repeats 64 times>}
(gdb) p *((struct dsw_evdev
*)rte_eventdevs[0].data->dev_private)->ports[0]->in_ring
$10 = {r = {name = "dsw0_p0", '\000' <repeats 24 times>, flags = 6, memzone =
0xc000000090, size = 32768, mask = 32767, capacity = 16384, pad0 = 0 '\000', prod = {head = 0,
tail = 0,
single = 0}, pad1 = 0 '\000', cons = {head = 0, tail = 0, single = 1},
pad2 = 0 '\000'}}
(gdb) p *((struct dsw_evdev
*)rte_eventdevs[0].data->dev_private)->ports[1]->in_ring
$11 = {r = {name = "dsw0_p1", '\000' <repeats 24 times>, flags = 6, memzone =
0xc000000120, size = 32768, mask = 32767, capacity = 16384, pad0 = 0 '\000', prod = {head =
475778,
tail = 475778, single = 0}, pad1 = 0 '\000', cons = {head = 475778, tail
= 475778, single = 1}, pad2 = 0 '\000'}}
(gdb) p *((struct dsw_evdev
*)rte_eventdevs[0].data->dev_private)->ports[2]->in_ring
$12 = {r = {name = "dsw0_p2", '\000' <repeats 24 times>, flags = 6, memzone =
0xc0000001b0, size = 32768, mask = 32767, capacity = 16384, pad0 = 0 '\000', prod = {head =
313358,
tail = 313358, single = 0}, pad1 = 0 '\000', cons = {head = 313358, tail
= 313358, single = 1}, pad2 = 0 '\000'}}
(gdb) p *((struct dsw_evdev
*)rte_eventdevs[0].data->dev_private)->ports[3]->in_ring
$13 = {r = {name = "dsw0_p3", '\000' <repeats 24 times>, flags = 6, memzone =
0xc000000240, size = 32768, mask = 32767, capacity = 16384, pad0 = 0 '\000', prod = {head =
165403,
tail = 165403, single = 0}, pad1 = 0 '\000', cons = {head = 165403, tail
= 165403, single = 1}, pad2 = 0 '\000'}}
(gdb) p *((struct dsw_evdev
*)rte_eventdevs[0].data->dev_private)->ports[4]->in_ring
$14 = {r = {name = "dsw0_p4", '\000' <repeats 24 times>, flags = 6, memzone =
0xc0000002d0, size = 32768, mask = 32767, capacity = 16384, pad0 = 0 '\000', prod = {head =
208237,
tail = 208237, single = 0}, pad1 = 0 '\000', cons = {head = 208237, tail
= 208237, single = 1}, pad2 = 0 '\000'}}
(gdb) p *((struct dsw_evdev
*)rte_eventdevs[0].data->dev_private)->ports[5]->in_ring
$15 = {r = {name = "dsw0_p5", '\000' <repeats 24 times>, flags = 6, memzone =
0xc000000360, size = 32768, mask = 32767, capacity = 16384, pad0 = 0 '\000', prod = {head =
633700,
tail = 633700, single = 0}, pad1 = 0 '\000', cons = {head = 633700, tail
= 633700, single = 1}, pad2 = 0 '\000'}}
(gdb) p *((struct dsw_evdev
*)rte_eventdevs[0].data->dev_private)->ports[6]->in_ring
$16 = {r = {name = "dsw0_p6", '\000' <repeats 24 times>, flags = 6, memzone =
0xc0000003f0, size = 32768, mask = 32767, capacity = 16384, pad0 = 0 '\000', prod = {head =
152617,
tail = 152617, single = 0}, pad1 = 0 '\000', cons = {head = 152617, tail
= 152617, single = 1}, pad2 = 0 '\000'}}
(gdb) p *((struct dsw_evdev
*)rte_eventdevs[0].data->dev_private)->ports[7]->in_ring
$17 = {r = {name = "dsw0_p7", '\000' <repeats 24 times>, flags = 6, memzone =
0xc000000480, size = 32768, mask = 32767, capacity = 16384, pad0 = 0 '\000', prod = {head = 0,
tail = 0,
single = 0}, pad1 = 0 '\000', cons = {head = 0, tail = 0, single = 1},
pad2 = 0 '\000'}}