> -----Original Message-----
> From: dev <dev-boun...@dpdk.org> On Behalf Of Van Haaren, Harry
> Sent: Wednesday, September 23, 2020 3:17 PM
> To: Mattias Rönnblom <mattias.ronnb...@ericsson.com>; dev@dpdk.org
> Cc: david.march...@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2 1/2] service: add component useful work
> attribute
> 
> > -----Original Message-----
> > From: Mattias Rönnblom <mattias.ronnb...@ericsson.com>
> > Sent: Wednesday, September 23, 2020 12:40 PM
> > To: Van Haaren, Harry <harry.van.haa...@intel.com>; dev@dpdk.org
> > Cc: david.march...@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH v2 1/2] service: add component useful work
> > attribute
> 
> Hi Mattias,
> 
> Thanks for taking time to review & prompt reply!

Ping Mattias - any input based on follow up discussion below?


> > On 2020-09-14 16:37, Harry van Haaren wrote:
> > > This commit adds a new attribute which allows the service to indicate
> > > if the previous iteration of work was "useful". Useful work here implies
> > > forward progress was made.
> >
> > > Exposing this information via an attribute to the application allows
> > > tracking of CPU cycles as being useful or not-useful, and a CPU load
> > > estimate can be deduced from that information.
> >
> >
> > How would that tracking be implemented? rte_service.c already keeps
> > track of the amount of busy cycles per service. Would it be possible to
> > reuse that mechanism to achieve the same goal?
> 
> Tracking "busy cycles" is not exactly the same - Eventdev SW PMD can spend
> cycles polling, and trying to move packets around its internal queues, but 
> make
> no forward progress. Measuring cycles spent in the service would not indicate
> the correct "busyness" in that case.
> 
> In the suggested patchset, each service (e.g Eventdev SW PMD) can update
> a statistic itself, pushing an attribute value into the service-cores layer.
> This method allows each PMD to define "useful work" in its own way.
> 
> > We did some prototyping on dynamic load balancing for the service core
> > framework, and then we extended the API is such a way that the service
> > callback would return a bool indicating if forward progress was made, if
> > I recall correctly. Sampling these counters allowed for tracking load on
> > both a per-lcore and per-service basis.
> 
> The service callback return value can be stored/inspected on the service-core
> itself, but how to show that to the application? It still requires an 
> attribute API
> like proposed below re-using "attr_get" API I think.
> 
> So really the only difference in the prototype you mention is how the
> service itself communicates business to the service-cores infrastructure in 
> EAL.
> 
> Perhaps re-purposing return-value is simpler, but it limits statistics from 
> the
> service to just business, and the API change requires all services to change.
> 
> Pros of adding an API as this patchset proposes is to push attribute values to
> service-core in EAL is extensibility, and no API breakage.
> 
> Given that context, Ack / push-back to this suggested approach?


<snip patch contents>

Reply via email to