From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Liang, Ma" Subject: Re: [PATCH v10 1/4] lib/librte_power: traffic pattern aware power control Date: Fri, 12 Oct 2018 11:02:38 +0100 Message-ID: <20181012100238.GC12694@sivswdev01.ir.intel.com> References: <1538146714-30973-1-git-send-email-liang.j.ma@intel.com> <1538488107-7181-1-git-send-email-liang.j.ma@intel.com> <2DBBFF226F7CF64BAFCA79B681719D9544FFB1A9@shsmsx102.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: "Hunt, David" , "dev@dpdk.org" , "ktraynor@redhat.com" , "Kovacevic, Marko" To: "Yao, Lei A" Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 33D731B43D for ; Fri, 12 Oct 2018 12:02:42 +0200 (CEST) Content-Disposition: inline In-Reply-To: <2DBBFF226F7CF64BAFCA79B681719D9544FFB1A9@shsmsx102.ccr.corp.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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