From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 6394E69EC for ; Tue, 14 Mar 2017 11:44:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1489488270; x=1521024270; h=subject:to:references:cc:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=GVxevlKQBjTAjvPMCjrlAgsXPLWWamKzCtSUGZHlT8o=; b=nHn1I9Y/7tc6gard/mBnrFbLJwzZMS/PkqEDgJhT4lEQ82/x0Tfj9hxC x8CEvDnGqijOr4SiuDLDf2dAdL0WRQ==; Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Mar 2017 03:44:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,163,1486454400"; d="scan'208";a="75896898" Received: from dhunt5-mobl.ger.corp.intel.com (HELO [10.237.221.69]) ([10.237.221.69]) by fmsmga005.fm.intel.com with ESMTP; 14 Mar 2017 03:44:28 -0700 To: Bruce Richardson References: <1488354455-142764-2-git-send-email-david.hunt@intel.com> <1488791433-186137-1-git-send-email-david.hunt@intel.com> <1488791433-186137-13-git-send-email-david.hunt@intel.com> <20170310164641.GC339712@bricha3-MOBL3.ger.corp.intel.com> Cc: dev@dpdk.org From: "Hunt, David" Message-ID: <678084d9-1686-7be7-d021-958be5c2a238@intel.com> Date: Tue, 14 Mar 2017 10:44:28 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170310164641.GC339712@bricha3-MOBL3.ger.corp.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v9 12/18] examples/distributor: allow for extra stats 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: Tue, 14 Mar 2017 10:44:30 -0000 On 10/3/2017 4:46 PM, Bruce Richardson wrote: > On Mon, Mar 06, 2017 at 09:10:27AM +0000, David Hunt wrote: >> + freq = rte_get_timer_hz(); >> + t = rte_rdtsc() + freq; >> + while (!quit_signal_dist) { >> + if (t < rte_rdtsc()) { >> + print_stats(); >> + t = rte_rdtsc() + freq; >> + } >> + } >> + > You can probably put in a usleep or nanosleep inot the while loop above. > No need to burn an entire core by polling the tsc. > > /Bruce Done in the next version. Dave.