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 BF9B0A00C4; Sun, 6 Nov 2022 12:34:15 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A558840156; Sun, 6 Nov 2022 12:34:15 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id C6C954003C for ; Sun, 6 Nov 2022 12:34:13 +0100 (CET) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 62A785A; Sun, 6 Nov 2022 14:34:13 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 62A785A DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1667734453; bh=pOKaAii901iK39f5p79+hebngvBnPlp+EmSllw+XQhM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=r73eoMNyoRDChRFSe/wCz2pXpDmpCoB29tYH2i/E4QnGeXkt1YmauNo9LbqhRXsWK OssS4ZhoBPbUrxEhF1EYMYtBjvvt/xyO9pbiTYSMLKJyVsjJqQC8BHPB5VcsH1DAh3 s3lw6M1tt0R59U4GlRRnWMg7Xhgbw+AQspgkXjoY= Message-ID: <4651fe74-a8ae-c0ac-fb46-c7d0a2778ce6@oktetlabs.ru> Date: Sun, 6 Nov 2022 14:34:13 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH v4 2/3] mempool: add stats for unregistered non-EAL threads Content-Language: en-US To: =?UTF-8?Q?Morten_Br=c3=b8rup?= , olivier.matz@6wind.com, mattias.ronnblom@ericsson.com, stephen@networkplumber.org, jerinj@marvell.com, bruce.richardson@intel.com Cc: hofors@lysator.liu.se, thomas@monjalon.net, dev@dpdk.org References: <20221104111740.330-1-mb@smartsharesystems.com> <20221104120329.1219-1-mb@smartsharesystems.com> <20221104120329.1219-2-mb@smartsharesystems.com> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: <20221104120329.1219-2-mb@smartsharesystems.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 On 11/4/22 15:03, Morten Brørup wrote: > This patch adds statistics for unregistered non-EAL threads, which was > previously not included in the statistics. > > Add one more entry to the stats array, and use the last index for > unregistered non-EAL threads. > > The unregistered non-EAL thread statistics are incremented atomically. > > In theory, the EAL thread counters should also be accessed atomically to > avoid tearing on 32 bit architectures. However, it was decided to avoid > the performance cost of using atomic operations, because: > 1. these are debug counters, and > 2. statistics counters in DPDK are usually incremented non-atomically. > > v4: > * No changes. > v3 (feedback from Mattias Rönnblom): > * Use correct terminology: Unregistered non-EAL threads. > * Use atomic counting for the unregistered non-EAL threads. > * Reintroduce the conditional instead of offsetting the index by one. > v2: > * New. No v1 of this patch in the series. > > Suggested-by: Stephen Hemminger > Signed-off-by: Morten Brørup Reviewed-by: Andrew Rybchenko