From patchwork Fri Nov 20 01:53:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhihong Wang X-Patchwork-Id: 9016 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 8F8F78E65; Fri, 20 Nov 2015 09:56:50 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 2A5EA8DB5 for ; Fri, 20 Nov 2015 09:56:48 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 20 Nov 2015 00:56:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,321,1444719600"; d="scan'208";a="855586448" Received: from unknown (HELO dpdk5.sh.intel.com) ([10.239.129.244]) by fmsmga002.fm.intel.com with ESMTP; 20 Nov 2015 00:56:20 -0800 From: Zhihong Wang To: dev@dpdk.org Date: Thu, 19 Nov 2015 20:53:47 -0500 Message-Id: <1447984428-137897-2-git-send-email-zhihong.wang@intel.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1447984428-137897-1-git-send-email-zhihong.wang@intel.com> References: <1447984428-137897-1-git-send-email-zhihong.wang@intel.com> Subject: [dpdk-dev] [PATCH RFC v2 1/2] lib/librte_eal: Reduce timer initialization time X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Changing from 1/2 second to 1/10 doesn't compromise the precision, and a 4/10 second is worth saving. Signed-off-by: Zhihong Wang --- lib/librte_eal/linuxapp/eal/eal_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_timer.c b/lib/librte_eal/linuxapp/eal/eal_timer.c index e0642de..4de0353 100644 --- a/lib/librte_eal/linuxapp/eal/eal_timer.c +++ b/lib/librte_eal/linuxapp/eal/eal_timer.c @@ -271,7 +271,7 @@ get_tsc_freq(void) #ifdef CLOCK_MONOTONIC_RAW #define NS_PER_SEC 1E9 - struct timespec sleeptime = {.tv_nsec = 5E8 }; /* 1/2 second */ + struct timespec sleeptime = {.tv_nsec = 1E8 }; /* 1/10 second */ struct timespec t_start, t_end; uint64_t tsc_hz;