On 3/17/2023 11:09 AM, Anthony Harivel wrote: > Ferruh Yigit, Mar 16, 2023 at 18:05: >> Hi Anthony, >> >> What is the motivation here? > > Hi Ferruh, > > AFAIK testpmd is the reference tool used for CI and tests whether it is > for functional or performance tests and I think it would be in > everyone's interest to consume less CPU during them. Moreover, all > patches coming to the ML are going through validation tests and this > could reduce the maintenance cost of the project. >
I don't think testpmd CPU usage is a real concern, it is only used by limited number of people and only for a limited duration. And optimizations like this may jeopardize its main task. On the other hand, CPU/power consumption of a DPDK application in production is a concern, and there may be many parties interested in to reduce watt/core with a reasonable performance impact. There is already a 'power' library for this purpose, to enable power optimizations for all DPDK applications, instead of just implementing them on a specific application (like testpmd). In my experience heuristics approaches (as done in your patch) depends on workload, while it helps for some usecases it may hurt in others. Still there may be customers willing to test a specific one for a specific workload. What do you think to have these heuristics approaches implemented in the power library, and add a new power sample application that selects one of existing algorithm as a kind of plugin? It can start with single algorithm, that is what you used in this patch. But overall how to add them into power library needs to be designed. cc'ed @Dave as power library/sample maintainer.