From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 08CA9A0C4B; Wed, 7 Jul 2021 16:47:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D0D2B413EE; Wed, 7 Jul 2021 16:47:56 +0200 (CEST) Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by mails.dpdk.org (Postfix) with ESMTP id ADEBD413B6 for ; Wed, 7 Jul 2021 16:47:55 +0200 (CEST) Received: by mail-pj1-f48.google.com with SMTP id l11so1674453pji.5 for ; Wed, 07 Jul 2021 07:47:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RjCVp6W6i0aDGGzpLK0GuSL4hddwmW3yutw7nRik1IE=; b=M0hoG694hiEim+rJPm0S6ME8pFLPeDMNHFfxpIrroLGOnZRvBJittl9/8TE8PadAZ2 4e2ai+cKTsxmA2xjGqa6FYubIV+YIi5yfDvYjLYtGpHuTH6P3KxzFNd0ezqa8LpVEeC/ 7gey86jAVlNhnHiWECaUE8L2R/bknDxQB0XTGuO9ZVid+UPVn1PZC2SWzXoYaJGHkqhZ 3NxVA5g/jTL8lqQqED3s3XlvDjzDP9PFVDFjfAFodBM8zkxvAxsA9LLM/ifTCwr1PgvM BC+HGmo7+4cku2XXXQGJKE3k4iENhFVgUsX5DMFxE5kV82/b5w6ho40WnocVpLzF3v1w 6F2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RjCVp6W6i0aDGGzpLK0GuSL4hddwmW3yutw7nRik1IE=; b=mgKRblAslglDI+kjHz1BApZOQJ+hv78rqXAESK9dQUQ+FlW0sBArGMJmf+IyQ/VJM+ r8MRtWpQk/X427CAwnTtRev8RZA+2fMPkVwViGy0PlP4WI6e/p23uMACWSCctPrPJrJg VdJgID7w0V2DEtROwL783jgF5D04L/iXYWjCiMZU7YORPBlkyG7ks16Iu0NYB+pRnBUI 29u2e/ExbJeSe8GIS2oUxtOoG93ei2Do7klRNkupr9Snp6WhumTXbL4MihUPIPWQCRH3 Ne17tRJ/YqbZWCYHftsjUbK9ooibxz7MZ2MYfJZCLyRwGvoTsfhPnSmpIapypuJq7rct kuNQ== X-Gm-Message-State: AOAM530n9YSrjarHtHkEGPVXwS26XLMLMlhfgOpwPPj68F7dFUfzj/mQ albnbj2Ix8Vv3vE2rKJn61SOQA== X-Google-Smtp-Source: ABdhPJzdEL5rkegvWHhLlj81ZRaXii2Y9mZvEucVDNTConH/qfh2jqN8MuoodDHdBi1EVtsow4pdLQ== X-Received: by 2002:a17:902:b711:b029:11e:6480:258a with SMTP id d17-20020a170902b711b029011e6480258amr21949161pls.41.1625669274863; Wed, 07 Jul 2021 07:47:54 -0700 (PDT) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id bp4sm6624332pjb.53.2021.07.07.07.47.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jul 2021 07:47:54 -0700 (PDT) Date: Wed, 7 Jul 2021 07:47:51 -0700 From: Stephen Hemminger To: Ruifeng Wang Cc: dev@dpdk.org, david.marchand@redhat.com, thomas@monjalon.net, jerinj@marvell.com, nd@arm.com, honnappa.nagarahalli@arm.com Message-ID: <20210707074751.2f3e53da@hermes.local> In-Reply-To: <20210425055653.1509261-1-ruifeng.wang@arm.com> References: <20200424070741.16619-1-gavin.hu@arm.com> <20210425055653.1509261-1-ruifeng.wang@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] Use WFE for spinlock and ring X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 Sun, 25 Apr 2021 05:56:51 +0000 Ruifeng Wang wrote: > The rte_wait_until_equal_xxx APIs abstract the functionality of 'polling > for a memory location to become equal to a given value'[1]. > > Use the API for the rte spinlock and ring implementations. > With the wait until equal APIs being stable, changes will not impact ABI. > > [1] http://patches.dpdk.org/cover/62703/ > > v3: > Series rebased. (David) > > Gavin Hu (1): > spinlock: use wfe to reduce contention on aarch64 > > Ruifeng Wang (1): > ring: use wfe to wait for ring tail update on aarch64 > > lib/eal/include/generic/rte_spinlock.h | 4 ++-- > lib/ring/rte_ring_c11_pvt.h | 4 ++-- > lib/ring/rte_ring_generic_pvt.h | 3 +-- > 3 files changed, 5 insertions(+), 6 deletions(-) > Other places that should use WFE: rte_mcslock.h:rte_mcslock_lock() rte_mcslock_unlock:rte_mcslock_unlock() rte_pflock.h:rte_pflock_lock() rte_rwlock.h:rte_rwlock_read_lock() rte_rwlock.h:rte_rwlock_write_lock() You should also introduce rte_wait_while_XXX variants to handle some of these cases.