From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F098CA0579; Wed, 7 Apr 2021 12:14:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 53D1B140EE7; Wed, 7 Apr 2021 12:14:48 +0200 (CEST) Received: from sender11-of-o51.zoho.eu (sender11-of-o51.zoho.eu [31.186.226.237]) by mails.dpdk.org (Postfix) with ESMTP id 4FBEB4013F; Wed, 7 Apr 2021 12:14:47 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; t=1617790484; cv=none; d=zohomail.eu; s=zohoarc; b=LoQX8xbdjeDV+zgqlKZoKeoblPVbyKJpIRFbqYtfcHGBqx++1uwFJRPd/406/0pjZKsRcaEqD/xexVfqwRlebfxBQXmwPuUyqeKa93NvTdW48iNUU0cnAUMtdD4HLpI0MKLopUt2/eqrezbsVam1zZEPDE/w4OorF6rtpQuCufw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1617790484; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=uy8B6kdu9rSiSY7pH/3CVGtaICJIc2CIcbzJnwatiAs=; b=dFZENdilOTNLDzHxwR3m4P96BWy/p74HEW1wH29Z4COPgDDIxs49mlTm3qcjO321n8Yo2qaR2hRou29uxx9X+Rezw06IzbHtRCjzBFc/xrH4Miu+8ZzkO74eR4rRHjb9Zw0NlGEgSfX5zH6bhc/j4WZEUM2HwkYsR9DDgsBxCmo= ARC-Authentication-Results: i=1; mx.zohomail.eu; spf=pass smtp.mailfrom=liangma@liangbit.com; dmarc=pass header.from= header.from= Received: from C02F33EJML85 (47.254.128.112 [47.254.128.112]) by mx.zoho.eu with SMTPS id 161779048153993.97321872994519; Wed, 7 Apr 2021 12:14:41 +0200 (CEST) Date: Wed, 7 Apr 2021 11:14:38 +0100 From: Liang Ma To: Richael Zhuang Cc: dev@dpdk.org, alan.carew@intel.com, stable@dpdk.org, David Hunt , Pablo de Lara Message-ID: References: <20210407023910.51052-1-richael.zhuang@arm.com> <20210407074636.26891-1-richael.zhuang@arm.com> <20210407074636.26891-4-richael.zhuang@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210407074636.26891-4-richael.zhuang@arm.com> X-ZohoMailClient: External Subject: Re: [dpdk-dev] [PATCH v3 3/3] test/power: add delay before checking cpuinfo cur freq X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list 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 Wed, Apr 07, 2021 at 03:46:36PM +0800, Richael Zhuang wrote: > Sleep for 1s before checking the newly updated value from > "/sys/devices/system/cpu/cpu%u/cpufreq/cpuinfo_cur_freq", because > for some systems it may not be effective immediately. > > Fixes: ed7c51a6a680 ("app/test: vm power management") > Cc: alan.carew@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Richael Zhuang > --- > app/test/test_power_cpufreq.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c > index cda74bd8a..7a93bc90a 100644 > --- a/app/test/test_power_cpufreq.c > +++ b/app/test/test_power_cpufreq.c > @@ -47,6 +47,9 @@ static uint32_t freqs[TEST_POWER_FREQS_NUM_MAX]; > static int > check_cur_freq(unsigned lcore_id, uint32_t idx) > { > + /* wait for the value to be updated */ > + sleep(1); Hi Richael, 1 second looks way too much for CPU frequency swap. The unit should be ms in the worst case regardless the vendor, IMO. Regards Liang > + > #define TEST_POWER_CONVERT_TO_DECIMAL 10 > FILE *f; > char fullpath[PATH_MAX]; > -- > 2.20.1 >