To my understanding, per eventdev API, events are considered in flight
between NEW to RELEASE (implicit/explicit). Now consider an event (event-1)
going thru the following stages:

   1. NEW from core-3
   2. dequeued by core-1
   3. FORWARD
   4. core-1 does a next dequeue
   5. dequeued by core-2
   6. RELEASE by core-2/implicit release on next dequeue by core-2

The way I understand DSW implementation this event would use credit at step
1 AND step 3 while releasing in step2 -- right now credit usage is for
non_release (i.e NEW and FORWARD). So if between step-2 and step-3 another
core puts in a NEW of event-2 that could utilize all the credits of the
system and could thus fail step-3 of event-1.
This to my knowledge is not conformant with eventdev. One way to address
this is to track the credits for that which are currently in core and not
make those credits available to NEW but only for FORWARDs ... there are
more details of course.

Hope this explains
Thanks
-Venky



On Fri, Dec 6, 2019 at 12:37 PM Mattias Rönnblom <
mattias.ronnb...@ericsson.com> wrote:

> On 2019-12-06 17:32, Venky Venkatesh wrote:
> > Thanks Mattias for the clarifications.
> >
> > 1 more question: This time it is about the inflight accounting for DSW.
> > Here is my understanding: it seems to consider only the events which
> > are *inside
> > the scheduler* as in flight.
>
> Yes, like all event devices, I believe.
>
> > I am trying to distinguish it from those which
> > have been currently given to cores by the scheduler. The latter are not
> > considered in flight since we dsw_port_return_credits as soon as
> > dsw_event_dequeue_burst.
>
> A new dequeue means an implicit release of all unreleased events
> dequeued in the previous call. It's standard Eventdev semantics.
>
> > So if these events which are in core currently do
> > a FORWARD, there is a chance that those can fail. Ideally those FORWARDs
> > should not fail -- which can happen with the current design as some NEWs
> > can hog those credits freed up by the ones which have been dequeued by
> > cores.
>
> What you do to avoid this situation is set the new_event_threshold
> low-enough, so NEW events don't block FORWARDed ones.
>
> > Is this design of DSW intentional or an omission? If it is an
> > omission I can work on a possible fix and run it by you.
> >
>
> This is not really a DSW design, but rather how Eventdev works.
>

Reply via email to