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 C131DA0C49; Wed, 7 Jul 2021 14:02:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AB62A414E8; Wed, 7 Jul 2021 14:02:27 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 53B2641391 for ; Wed, 7 Jul 2021 14:02:26 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10037"; a="209331655" X-IronPort-AV: E=Sophos;i="5.83,331,1616482800"; d="scan'208";a="209331655" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2021 05:02:16 -0700 X-IronPort-AV: E=Sophos;i="5.83,331,1616482800"; d="scan'208";a="482145016" Received: from dhunt5-mobl5.ger.corp.intel.com (HELO [10.252.24.114]) ([10.252.24.114]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2021 05:02:09 -0700 To: Anatoly Burakov , dev@dpdk.org Cc: konstantin.ananyev@intel.com, ciara.loftus@intel.com References: <54810fdb921a364c793b650f21d0f396727693cf.1625654882.git.anatoly.burakov@intel.com> From: David Hunt Message-ID: <26c6cd20-f2a9-b4f8-dd41-fdc15a5cb36e@intel.com> Date: Wed, 7 Jul 2021 13:02:08 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <54810fdb921a364c793b650f21d0f396727693cf.1625654882.git.anatoly.burakov@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [dpdk-dev] [PATCH v7 4/7] power: remove thread safety from PMD power API's 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 7/7/2021 11:48 AM, Anatoly Burakov wrote: > Currently, we expect that only one callback can be active at any given > moment, for a particular queue configuration, which is relatively easy > to implement in a thread-safe way. However, we're about to add support > for multiple queues per lcore, which will greatly increase the > possibility of various race conditions. > > We could have used something like an RCU for this use case, but absent > of a pressing need for thread safety we'll go the easy way and just > mandate that the API's are to be called when all affected ports are > stopped, and document this limitation. This greatly simplifies the > `rte_power_monitor`-related code. > > Signed-off-by: Anatoly Burakov > --- > > Notes: > v2: > - Add check for stopped queue > - Clarified doc message > - Added release notes > Tested-by: David Hunt