From patchwork Mon Jul 18 17:16:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Brooks X-Patchwork-Id: 72243 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp220703qga; Mon, 18 Jul 2016 10:17:53 -0700 (PDT) X-Received: by 10.55.167.199 with SMTP id q190mr45689618qke.95.1468862273132; Mon, 18 Jul 2016 10:17:53 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 37si8730130qty.156.2016.07.18.10.17.52; Mon, 18 Jul 2016 10:17:53 -0700 (PDT) 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; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id BA68F635C7; Mon, 18 Jul 2016 17:17:52 +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.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, 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 63BDC61718; Mon, 18 Jul 2016 17:17:50 +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 1B70961737; Mon, 18 Jul 2016 17:17:48 +0000 (UTC) Received: from mail-pf0-f171.google.com (mail-pf0-f171.google.com [209.85.192.171]) by lists.linaro.org (Postfix) with ESMTPS id 074AA687EE for ; Mon, 18 Jul 2016 17:16:54 +0000 (UTC) Received: by mail-pf0-f171.google.com with SMTP id x72so7359742pfd.2 for ; Mon, 18 Jul 2016 10:16:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=TIV5xGNKPgOke6T2d19h4WfvQT/1tZCIOx/aXFd5WOU=; b=NvS0n487MMymQuSkwA5S3BY7WyZEKPGTR7H9KsaiJInvnJNKWUOD+8ettnyV7BqhyK zjx014rIu7ApNc2+L1QzSknwhpk8e2GcEPRoOXrHHLN+RKLQn3dOnx5oZnTMC37qDC8B Bw3GGjTG0nkv4PXqFGLS6TlFJm5hyvCsRQ6wfDTLKS0ho1RpDKoCuZu4e3iOvl39rCxD YBP8MJKWxFJzf7uL6xJGnxIRxZqeeOn0rsT4JqUjKlCIqQ8ziKF7r/FDOaN5L8xndvCY tpDMXh2huykCvXL3SXyZkDXkXKak0wk4jH7Nui4TQrRQ8A6hsSYF46YkVccwXw4RHKeQ +f8w== X-Gm-Message-State: ALyK8tLTH4YEx1peEsWEE8U5t4GaUngDWRbFfYiyoQS6PHjS509xkSSb2s3lOKTNszXfWYAQ7R4= X-Received: by 10.98.79.140 with SMTP id f12mr40375509pfj.161.1468862212963; Mon, 18 Jul 2016 10:16:52 -0700 (PDT) Received: from localhost.localdomain ([192.241.201.113]) by smtp.gmail.com with ESMTPSA id x68sm6354660pfb.88.2016.07.18.10.16.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Jul 2016 10:16:50 -0700 (PDT) From: Brian Brooks To: lng-odp@lists.linaro.org Date: Mon, 18 Jul 2016 13:16:45 -0400 Message-Id: <1468862206-25102-1-git-send-email-brian.brooks@linaro.org> X-Mailer: git-send-email 2.5.0 X-Topics: timers patch Subject: [lng-odp] [PATCH 1/2] example: odp_timer_simple: decrease timer pool resolution 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" POSIX timer overruns are experienced on Linux generic platforms when resolution is less than one millisecond. Decrease resolution from 10 microseconds to 10 milliseconds so this example program works as intended on generic Linux platforms. Signed-off-by: Brian Brooks --- example/timer/odp_timer_simple.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.9.0 Reviewed-by: Kevin Wang diff --git a/example/timer/odp_timer_simple.c b/example/timer/odp_timer_simple.c index 98c08ce..70804bb 100644 --- a/example/timer/odp_timer_simple.c +++ b/example/timer/odp_timer_simple.c @@ -61,8 +61,8 @@ int main(int argc ODP_UNUSED, char *argv[] ODP_UNUSED) /* * Create pool of timeouts */ - tparams.res_ns = 10 * ODP_TIME_USEC_IN_NS; - tparams.min_tmo = 10 * ODP_TIME_USEC_IN_NS; + tparams.res_ns = 10 * ODP_TIME_MSEC_IN_NS; + tparams.min_tmo = 10 * ODP_TIME_MSEC_IN_NS; tparams.max_tmo = 1 * ODP_TIME_SEC_IN_NS; tparams.num_timers = 1; /* One timer per worker */ tparams.priv = 0; /* Shared */