[dpdk-dev] [PATCH v10 1/4] lib/librte_power: traffic pattern aware power control

Liang, Ma liang.j.ma at intel.com
Fri Oct 12 12:02:38 CEST 2018


On 11 Oct 18:59, Yao, Lei A wrote:
> 
> 
> +
> +		if (get_freq_index(LOW) > total_avail_freqs[i])
> +			return -1;
> +
> +		if (rte_get_master_lcore() != i) {
> +			w->wrk_stats[i].lcore_id = i;
> +			set_policy(&w->wrk_stats[i], policy);
> +		}
> +	}
> +
> +	return 0;
> +}
> 
> Hi, Liang
> 
> There is one issue in this part. 
> When you find one frequency level can't be support on the server
> we used,  you return directly. This will skip the set_policy step in the following. 
> If skip the set_policy step, the behavior will be the power lib always 
> execute the training steps, even we set the policy.state=MED_NORMAL in the sample.  
> This will confuse the user, they don’t know why they can't skip the training steps even
> the sample is already configured to --empty-poll=0,xxxxx,xxxxxx
> 
> BRs
> Lei
Hi Lei,
   I think the lib code logic is OK. 
   if the LOW freq index still is bigger than highest avaiable freq index, sth is wrong. 
   the execution should stop.
   Simple app should check the rte_power_empty_poll_stat_init
   result, if rte_power_empty_poll_stat_init return error. the sample app should exit.
   I can update the sample app code add the checking. 
Regards
Liang



More information about the dev mailing list