[dpdk-dev] [PATCH v2 07/15] event/sw: add support for event queues

Van Haaren, Harry harry.van.haaren at intel.com
Tue Feb 7 10:58:13 CET 2017


> -----Original Message-----
> From: Jerin Jacob [mailto:jerin.jacob at caviumnetworks.com]
> Sent: Tuesday, February 7, 2017 6:58 AM
> To: Van Haaren, Harry <harry.van.haaren at intel.com>
> Cc: dev at dpdk.org; Richardson, Bruce <bruce.richardson at intel.com>
> Subject: Re: [PATCH v2 07/15] event/sw: add support for event queues
> 
> On Mon, Feb 06, 2017 at 10:25:18AM +0000, Van Haaren, Harry wrote:
> > > -----Original Message-----
> > > From: Jerin Jacob [mailto:jerin.jacob at caviumnetworks.com]
> > > Sent: Monday, February 6, 2017 9:25 AM
> > > To: Van Haaren, Harry <harry.van.haaren at intel.com>
> > > Cc: dev at dpdk.org; Richardson, Bruce <bruce.richardson at intel.com>
> > > Subject: Re: [PATCH v2 07/15] event/sw: add support for event queues
> > >
> > > On Tue, Jan 31, 2017 at 04:14:25PM +0000, Harry van Haaren wrote:
> > > > From: Bruce Richardson <bruce.richardson at intel.com>
> > > >
> > > > Add in the data structures for the event queues, and the eventdev
> > > > functions to create and destroy those queues.
> > > >
> > > > Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
> > > > Signed-off-by: Harry van Haaren <harry.van.haaren at intel.com>
> > > > ---
> > > >  drivers/event/sw/iq_ring.h  | 176 ++++++++++++++++++++++++++++++++++++++++++++
> > > >  drivers/event/sw/sw_evdev.c | 158 +++++++++++++++++++++++++++++++++++++++
> > > >  drivers/event/sw/sw_evdev.h |  75 +++++++++++++++++++
> > > >  3 files changed, 409 insertions(+)
> > > >  create mode 100644 drivers/event/sw/iq_ring.h
> > > >
> > > > + */
> > > > +
> > > > +/*
> > > > + * Ring structure definitions used for the internal ring buffers of the
> > > > + * SW eventdev implementation. These are designed for single-core use only.
> > > > + */
> > >
> > > If I understand it correctly, IQ and QE rings are single producer and
> > > single consumer rings. By the specification, multiple producers through
> > > multiple ports can enqueue to the event queues at a time.Does SW implementation
> > > support that? or am I missing something here?
> >
> > You're right that the IQ and QE rings are Single Producer, Single Consumer rings. More
> specifically, the QE is a ring for sending rte_event structs between cores, while the IQ ring
> is optimized for internal use in the scheduler core - and should not be used to send events
> between cores. Note that the design of the SW scheduler includes a central core for performing
> scheduling.
> 
> Thanks Harry. One question though,
> In RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED mode, multiple SW schedulers can
> be active. Right? If so, We need multi consumer. Right?

Note that the sw scheduler is a centralized scheduler, and does not support distributing the *scheduling* work itself.

In the case of having multiple software schedulers, each instance is its own scheduling domain - they don't interact with each other directly. There is no need for Multi-Producer / Multi-Consumer with this design as there is never more than 1 thread accessing the producer/consumer side of a ring.

> 
> >
> > In other works, the QE rings transfer events from the worker core to the scheduler - and the
> scheduler pushes the events into what you call the "event queues" (aka, the atomic/ordered
> queue itself). These "event queues" are IQ instances. On egress from the scheduler, the event
> passes through a QE ring to the worker.
> >
> > The result is that despite that only SP/SC rings are used, multiple workers can enqueue to
> any event queue.
> 
> Got it.
> 



More information about the dev mailing list