From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 602CBA2EEB for ; Thu, 12 Sep 2019 18:16:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 25F941EB34; Thu, 12 Sep 2019 18:16:43 +0200 (CEST) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by dpdk.org (Postfix) with ESMTP id BD5511E4DE for ; Thu, 12 Sep 2019 18:16:41 +0200 (CEST) Received: by mail-io1-f65.google.com with SMTP id f12so56029683iog.12 for ; Thu, 12 Sep 2019 09:16:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rFxjqdIdPlBLeBVoWohMX6BOi7YOdf239kNlsl+A8dw=; b=NLfpTOajIt0lfqfxohO5msp938sQHQ8meWCGH1ttg6ak9LMjEmrYkIFJlpglQ/WlOZ 8VJ6BxGk2A7qSpgOvubIxbydReeVw74WJd/ppiP5iofbbgJgB/dYRiQhO7t7MX2C5PSn UNJTX17Dh71pScQzMWsrz2JjqILOQVgHxLfhnn75sH/mQ9wY4Lo2vmvR+nD2/D6Q5bj/ rX8MDgRmmo4WwL4yFYy0evktKTqNKGuPE754ZILosl5WMRscU+JGfszYYRlV+HGgtiVG gnPxZG2XSSA+RqmIA3kykmZ6GU3uuOXsH+lsBv82Mmetvj88R4l/K4pCcaZsEaksdN+R ErNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rFxjqdIdPlBLeBVoWohMX6BOi7YOdf239kNlsl+A8dw=; b=GB8xgLMkx/20KMmgHamLwJ5yqXfpC1fKouIZqNRpxOolu2Wv6MKCO+yb058aIG0ThY 2/jYYeX4HLi8SCMhGuUB7cTjBCfELLncrve1wbOol53nuMWJhQt+CNKHMTd6HPROqoat mTJbiyPkQXbUhjGT0cym5W7Uu/AmQcQ468m9WGd9yjVt61DDGjraGSNXUsoT6ddKNeQl Qt3aLXXqmEdSV8jIawvVo7odKodJqK/2eZIl50X7/6il7IW9Zr3xt5lXzD5WrzjtatFL 6xi6zcjZQmpg6ppYcqbWNAdX+CK1VQ3eiGVkzRVNCY4xZvUW9JL/1tWhBnurqs0X277I 3MjA== X-Gm-Message-State: APjAAAW9XcoYYONmHDGfWg66/HkLzHlNQyWx4iFjDg+DeTapijhVz4mC IzmhdnPRt0kwYFq0eEqg89Zko/s0yKEHaHKqYUs= X-Google-Smtp-Source: APXvYqwX1DDx0aQjqmXISc/PpnkyaQy90EWW4agVkGjGCySKpcjEi1HhAI5hXRgUPZlyJ12p3sN0geZr5gaNhgQgdWE= X-Received: by 2002:a5d:814d:: with SMTP id f13mr5608262ioo.162.1568305001055; Thu, 12 Sep 2019 09:16:41 -0700 (PDT) MIME-Version: 1.0 References: <1561911676-37718-1-git-send-email-gavin.hu@arm.com> <1568287473-55306-1-git-send-email-gavin.hu@arm.com> <1568287473-55306-9-git-send-email-gavin.hu@arm.com> In-Reply-To: <1568287473-55306-9-git-send-email-gavin.hu@arm.com> From: Jerin Jacob Date: Thu, 12 Sep 2019 21:46:29 +0530 Message-ID: To: Gavin Hu Cc: dev@dpdk.org, nd@arm.com, Thomas Monjalon , stephen@networkplumber.org, hemant.agrawal@nxp.com, Jerin Jacob , Pavan Nikhilesh , Honnappa.Nagarahalli@arm.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v5 8/8] event/opdl: use new API to save cycles on aarch64 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 Thu, Sep 12, 2019 at 4:57 PM Gavin Hu wrote: > > Use the new API to wait in low power state instead of continuous > polling to save CPU cycles and power. > > Signed-off-by: Gavin Hu > Reviewed-by: Ruifeng Wang Reviewed-by: Jerin Jacob > --- > drivers/event/opdl/opdl_ring.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/event/opdl/opdl_ring.c b/drivers/event/opdl/opdl_ring.c > index e8b29e2..f446fa3 100644 > --- a/drivers/event/opdl/opdl_ring.c > +++ b/drivers/event/opdl/opdl_ring.c > @@ -17,6 +17,7 @@ > #include > #include > #include > +#include > > #include "opdl_ring.h" > #include "opdl_log.h" > @@ -475,9 +476,7 @@ opdl_ring_input_multithread(struct opdl_ring *t, const void *entries, > /* If another thread started inputting before this one, but hasn't > * finished, we need to wait for it to complete to update the tail. > */ > - while (unlikely(__atomic_load_n(&s->shared.tail, __ATOMIC_ACQUIRE) != > - old_head)) > - rte_pause(); > + rte_wait_until_equal_acquire_32(&s->shared.tail, old_head); > > __atomic_store_n(&s->shared.tail, old_head + num_entries, > __ATOMIC_RELEASE); > -- > 2.7.4 >