From patchwork Tue Dec 8 10:41:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 57843 Delivered-To: patch@linaro.org Received: by 10.112.147.194 with SMTP id tm2csp1706213lbb; Tue, 8 Dec 2015 02:41:22 -0800 (PST) X-Received: by 10.140.89.201 with SMTP id v67mr3585147qgd.38.1449571282875; Tue, 08 Dec 2015 02:41:22 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 89si2837445qgi.63.2015.12.08.02.41.22; Tue, 08 Dec 2015 02:41:22 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro-org.20150623.gappssmtp.com Received: by lists.linaro.org (Postfix, from userid 109) id 6EC0261CC9; Tue, 8 Dec 2015 10:41:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id AC9C661BB3; Tue, 8 Dec 2015 10:41:17 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 980D161CC5; Tue, 8 Dec 2015 10:41:14 +0000 (UTC) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com [209.85.217.169]) by lists.linaro.org (Postfix) with ESMTPS id 8A46E61B7D for ; Tue, 8 Dec 2015 10:41:13 +0000 (UTC) Received: by lbbkw15 with SMTP id kw15so8706851lbb.0 for ; Tue, 08 Dec 2015 02:41:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro-org.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=WXwRHP2NGLGSe9IK17JKqUDH6suz94a6xmaJ3/8ltY8=; b=jYsSOrNzDA3hrnrnhVweiimqsFPGa6EVPSul9vSdLsxl3Og15Nql0awP6FZtiWLzi6 btYhDgdm74kkDHh6hHIrb6SChSwig0qpB+Db9XSN1jP4Oqeovb+XeTmULH4fVR4SqfUz DAUzo0RJUt59G/NyL9ke+jeShNOka5sIcr4Li/I+lqR91LamJovXmsXu3k5boWtKsSOH 6a30pBeXxhZl/Hu7+nXGjppp0TMfpQERduqHHTo3UhHZLQCphdz70cxE16T/AcTKxQTp 2VK6S7AaQ8tTSbYecSpcDsJG2/m6J3HjxWSSpJVBjHLeOFPSJTq1vREoPlVuMeGLnljV wV8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=WXwRHP2NGLGSe9IK17JKqUDH6suz94a6xmaJ3/8ltY8=; b=l1BlAaoBZHModVRrg8KCrvQMd47WX9HGZqnoqQTzd07iz+lWypu32IfUFDuKeSGafs jVMXzhLOKP7eTDgSWty2ZeFyW1Zmd89/eIK96jfJiZ8yVAQLQGxPDXSpkjx7GqXI1N+U o3MOSvL9lH+vTQmD/XXDHjiBFgzhjeJLdOSi8GeR3LVMhp++DCgmPGyxmq19QRPUIfjZ A/7bFMsiC8AiQ2B/Caei14VJFT4CV78agMn94yvDvFYfPn54Pow8xEWEgFCGGxtstSkt LE7W/gtZFhBDmItmwD6DJWOfEYS98Mv3+qM7luqvdkWZndIR5iaJFsJ0TCl3hFjQJr6W tUmQ== X-Gm-Message-State: ALoCoQkL0Onm9QvtACCkksUdY5BDtEfZqS3Wxc+or1jMm75qqynProTPXPm1mGsUsiR/mmHiK+2WcrgtaJ9CaJeU93X4t45eyA== X-Received: by 10.112.11.133 with SMTP id q5mr1175608lbb.86.1449571272405; Tue, 08 Dec 2015 02:41:12 -0800 (PST) Received: from [193.168.1.37] (ppp91-76-173-134.pppoe.mtu-net.ru. [91.76.173.134]) by smtp.googlemail.com with ESMTPSA id zs6sm458283lbb.26.2015.12.08.02.41.11 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Dec 2015 02:41:11 -0800 (PST) To: lng-odp@lists.linaro.org, Petri Savolainen References: <1449251494-23210-1-git-send-email-ivan.khoronzhuk@linaro.org> From: Maxim Uvarov Message-ID: <5666B3C7.7050708@linaro.org> Date: Tue, 8 Dec 2015 13:41:11 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1449251494-23210-1-git-send-email-ivan.khoronzhuk@linaro.org> X-Topics: patch Subject: Re: [lng-odp] [API-NEXT PATCH v7 0/9] api: time: update local time to be monotonic X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" That patch serries looks ok, instead of one overrun of 32 bit counter. I can fix it just in place. Petri, agree? time.c: In function 'time_test_monotony': time.c:60:15: error: comparison is always true due to limited range of data type [-Werror=type-limits] while (count < BUSY_LOOP_CNT_LONG) { Maxim. On 12/04/2015 20:51, Ivan Khoronzhuk wrote: > This series is intended to modify time API to be used as monotonic wall > time in order to simplify time API usage and create prerequisites for > adding global time API. > > Since v6: > - changed patch order a little to pass validation tests > - fixed issue with pktio perf test > - no functional changes > > Since v5: > linux-generic: align with new wall time API > - deleted _odp prefix for local functions > - avoided modulo operation > - used common global var for start time > > Since v3: > - "api: time: make odp_local_time to be monotonic wall time" > splitted on; > "linux-generic: align with new wall time API" > "test/example: use local time API as wall time" > - increased BUSY_LOOP_CNT to fit in resolution and 4+ sec > > Since v2: > - removed patch changing type of ODP_TIME_* > - added new patch: > test: performance: pktio: don't use direct arithmetic operations with > odp_time_t > - added new patch: > performance: sched: use ODP time API instead of clock_gettime > - combined monotonic and wall time patches > - removed odp_time_local_val() and odp_time_val_to_ns() > - replaced terms monotonic and wall in API desc > > Since v1: > - corrected name of the series to be api-next > - use thread local for holding start time > > Ivan Khoronzhuk (9): > validation: time: don't assign int directly to odp_time_t > test: performance: pktio: don't use direct arithmetic operations with > odp_time_t > linux-generic: schedule: use schedule time in ns > linux-generic: odp_time: don't use cpu cycle API to get time > performance: sched: use ODP time API instead of clock_gettime > api: time: make odp_local_time to be monotonic wall time > validation: time: align tests with current time API > linux-generic: align with new wall time API > test/example: use local time API as wall time > > example/generator/odp_generator.c | 10 +- > include/odp/api/time.h | 3 +- > platform/linux-generic/Makefile.am | 1 - > .../linux-generic/include/odp/plat/time_types.h | 6 +- > platform/linux-generic/include/odp_cpu_internal.h | 29 --- > platform/linux-generic/include/odp_internal.h | 2 + > platform/linux-generic/odp_cpu.c | 6 +- > platform/linux-generic/odp_init.c | 4 + > platform/linux-generic/odp_schedule.c | 18 +- > platform/linux-generic/odp_time.c | 112 +++++++--- > test/performance/odp_pktio_perf.c | 24 +-- > test/performance/odp_scheduling.c | 37 +--- > test/validation/pktio/pktio.c | 21 +- > test/validation/time/time.c | 228 ++++++++++++++++++--- > test/validation/time/time.h | 7 +- > 15 files changed, 346 insertions(+), 162 deletions(-) > delete mode 100644 platform/linux-generic/include/odp_cpu_internal.h > --- a/test/validation/time/time.c +++ b/test/validation/time/time.c @@ -45,7 +45,7 @@ void time_test_odp_conversion(void) void time_test_monotony(void) { - volatile unsigned long count = 0; + volatile uint64_t count = 0; odp_time_t t1, t2, t3; uint64_t ns1, ns2, ns3;