From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Oct 2018 03:02:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,371,1534834800"; d="scan'208";a="98597687" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga001.fm.intel.com with ESMTP; 12 Oct 2018 03:02:39 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id w9CA2dI0013058; Fri, 12 Oct 2018 11:02:39 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id w9CA2dhJ029507; Fri, 12 Oct 2018 11:02:39 +0100 Received: (from lma25@localhost) by sivswdev01.ir.intel.com with LOCAL id w9CA2c4n029503; Fri, 12 Oct 2018 11:02:38 +0100 Date: Fri, 12 Oct 2018 11:02:38 +0100 From: "Liang, Ma" To: "Yao, Lei A" Cc: "Hunt, David" , "dev@dpdk.org" , "ktraynor@redhat.com" , "Kovacevic, Marko" 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2DBBFF226F7CF64BAFCA79B681719D9544FFB1A9@shsmsx102.ccr.corp.intel.com> User-Agent: Mutt/1.4.2.3i Subject: Re: [dpdk-dev] [PATCH v10 1/4] lib/librte_power: traffic pattern aware power control X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Oct 2018 10:02:42 -0000 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