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

Yao, Lei A lei.a.yao at intel.com
Fri Oct 12 15:22:18 CEST 2018



> -----Original Message-----
> From: Ma, Liang J
> Sent: Friday, October 12, 2018 6:03 PM
> To: Yao, Lei A <lei.a.yao at intel.com>
> Cc: Hunt, David <david.hunt at intel.com>; dev at dpdk.org;
> ktraynor at redhat.com; Kovacevic, Marko <marko.kovacevic at intel.com>
> Subject: Re: [PATCH v10 1/4] lib/librte_power: traffic pattern aware power
> control
> 
> 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
Hi, Liang

If sample will exit in this situation, it's OK for me. Thanks.

BRs
Lei


More information about the dev mailing list