From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id C098DA05D3 for ; Wed, 22 May 2019 11:46:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9512010BD; Wed, 22 May 2019 11:46:20 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id DA02AA69 for ; Wed, 22 May 2019 11:46:18 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2019 02:46:17 -0700 X-ExtLoop1: 1 Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.70]) ([10.237.220.70]) by orsmga004.jf.intel.com with ESMTP; 22 May 2019 02:46:16 -0700 To: "Pattan, Reshma" , "dev@dpdk.org" Cc: "Hunt, David" , "Ma, Liang J" References: <20190517181712.12027-1-reshma.pattan@intel.com> <3AEA2BF9852C6F48A459DA490692831F2A460482@irsmsx110.ger.corp.intel.com> From: "Burakov, Anatoly" Message-ID: <22aae3d5-65d7-1175-c1f9-01d83a6853c3@intel.com> Date: Wed, 22 May 2019 10:46:15 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <3AEA2BF9852C6F48A459DA490692831F2A460482@irsmsx110.ger.corp.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v1] examples/l3fwd-power: add telemetry mode support 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 21-May-19 3:53 PM, Pattan, Reshma wrote: > > >> -----Original Message----- >> From: Burakov, Anatoly >> Sent: Monday, May 20, 2019 2:17 PM >> To: Pattan, Reshma ; dev@dpdk.org >> Cc: Hunt, David ; Ma, Liang J >> Subject: Re: [PATCH v1] examples/l3fwd-power: add telemetry mode support >> > > > >>> --- >> >> >> >>> + poll_count = 0; >>> + prev_tel_tsc = cur_tsc; >>> + /* update stats for telemetry */ >>> + rte_spinlock_lock(&stats[lcore_id].telemetry_lock); >>> + stats[lcore_id].ep_nep[0] = ep_nep[0]; >>> + stats[lcore_id].ep_nep[1] = ep_nep[1]; >>> + stats[lcore_id].fp_nfp[0] = fp_nfp[0]; >>> + stats[lcore_id].fp_nfp[1] = fp_nfp[1]; >>> + stats[lcore_id].br = br; >>> + rte_spinlock_unlock(&stats[lcore_id].telemetry_lock); >> >> Locking here seems relatively rare (per-lcore and once every N polls), but any >> locking on a hotpath makes me nervous. What is the current performance >> impact of this? Should we bother improving? > > The performance impact is negligible, in thousands. In thousands of packets? Out of? > >>> >>> if (!strncmp(lgopts[option_index].name, >>> @@ -1869,6 +2068,52 @@ init_power_library(void) >>> return ret; >>> } >>> static void >>> +update_telemetry(__attribute__((unused)) struct rte_timer *tim, >>> + __attribute__((unused)) void *arg) >>> +{ >> >> I would question the need to put telemetry on a high precision 10ms timer. Is >> there any reason why we cannot gather telemetry, say, once every 100ms, and >> why we cannot do so from interrupt thread using alarm API? Using high- >> precision timer API here seems like an overkill. > > The l3-power uses the timers , so followed the same. But I am ok > to use ALARM api. Maybe just change the timer period then? 10ms to update telemetry looks way too often to me. Do we really expect telemetry to be gathered every 10ms? > > Thanks, > Reshma > -- Thanks, Anatoly