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 260E9A00C2; Sun, 30 Oct 2022 10:16:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 13BF740693; Sun, 30 Oct 2022 10:16:14 +0100 (CET) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by mails.dpdk.org (Postfix) with ESMTP id 800FF40151 for ; Sun, 30 Oct 2022 10:16:12 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id A64B2320051E; Sun, 30 Oct 2022 05:16:10 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sun, 30 Oct 2022 05:16:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1667121370; x= 1667207770; bh=ie8ti5OOAdhZMmFsQn1FOhgEsdngi0jLtvvs0twJtkc=; b=i kmzsqcN5IG569AtJHYe7exbAua4poq7ltYJAoR3cTen5f8UBlsl/V6BUF/9GpiU0 +BOy/oQ8U5fCNku5nrTCfmLyQ4yQCdyShzYmnVzxMgxxiD3J1+E51zXi2sklh45Z 9Tvwxnnfmq5nJjUT9REigIW4afop0dHKSEHSCPCwJiVAYjuohlIRUwslb3Iy20sS clEaWJIi0DzKER8CXyqwpiTDEhF75hRg2PCXUCrVmwe3jOh8797p2kfGn9y/DTHW JEG3VW2AM8ScGnkN8H2+4qxRn66hlEZlwIDi7j9DC0Swm2zr3zZ1Xv59rH6rs7MQ CHAKL4o83asA+o7rTasFw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1667121370; x= 1667207770; bh=ie8ti5OOAdhZMmFsQn1FOhgEsdngi0jLtvvs0twJtkc=; b=f GXpWipkVWv+/07RVismhGdkt1YVQp2nYTvKH+KS5QFzZr3II5cZCym3WIVlwv2GN eRvA05jlsOW2Pf740iZvWe1iZ5RZeLtlhjUVu87OT7WdVnvW6Qy2nmQLNeW0+gT7 McpjBY4+gWhdQObuX7ctWyvD00c2qqw2TkEmIYwWySDKxdZLVIQxSyH0paeW0cEb maWpD6oLOw5EqMDIodGi1xu8cUnP0AC/RhgGwijaQK63Tc4WKVQrHhsyz2sXlzhq CC7VYb1mJcRQYE2XUvxYkYyRauSrcy8x51MXYRKpj+XP8srv9Ib0kL4RGLls/uO2 ijUFsLvUMCAeJIy01W6/A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedruddtgddtvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkfgjfhgggfgtsehtqhertddttddunecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepfefhjeeluedvvedtuddtuedtvefhieejtefhffeujefhteduudev tdektdeikeffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 30 Oct 2022 05:16:08 -0400 (EDT) From: Thomas Monjalon To: Morten =?ISO-8859-1?Q?Br=F8rup?= Cc: olivier.matz@6wind.com, andrew.rybchenko@oktetlabs.ru, dev@dpdk.org, jerinj@marvell.com, bruce.richardson@intel.com, dev@dpdk.org Subject: Re: [PATCH v4 2/2] mempool: optimized debug statistics Date: Sun, 30 Oct 2022 10:16:07 +0100 Message-ID: <6364481.K2JlShyGXD@thomas> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D87462@smartserver.smartshare.dk> References: <20221026144436.71068-1-mb@smartsharesystems.com> <20221028064152.98341-2-mb@smartsharesystems.com> <98CBD80474FA8B44BF855DF32C47DC35D87462@smartserver.smartshare.dk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" 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 30/10/2022 10:09, Morten Br=F8rup: > > From: Morten Br=F8rup [mailto:mb@smartsharesystems.com] > > Sent: Friday, 28 October 2022 08.42 > >=20 > > When built with debug enabled (RTE_LIBRTE_MEMPOOL_DEBUG defined), the > > performance of mempools with caches is improved as follows. > >=20 > > Accessing objects in the mempool is likely to increment either the > > put_bulk and put_objs or the get_success_bulk and get_success_objs > > debug statistics counters. > >=20 > > By adding an alternative set of these counters to the mempool cache > > structure, accessing the dedicated debug statistics structure is > > avoided in > > the likely cases where these counters are incremented. > >=20 > > The trick here is that the cache line holding the mempool cache > > structure > > is accessed anyway, in order to update the "len" field. Updating some > > debug statistics counters in the same cache line has lower performance > > cost than accessing the debug statistics counters in the dedicated > > debug > > statistics structure, i.e. in another cache line. > >=20 > > Running mempool_perf_autotest on a VMware virtual server shows an avg. > > increase of 6.4 % in rate_persec for the tests with cache. (Only when > > built with debug enabled, obviously!) > >=20 > > For the tests without cache, the avg. increase in rate_persec is 0.8 %. > > I > > assume this is noise from the test environment. > >=20 > > v4: > > * Fix spelling and repeated word in commit message, caught by > > checkpatch. > > v3: > > * Try to fix git reference by making part of a series. > > * Add --in-reply-to v1 when sending email. > > v2: > > * Fix spelling and repeated word in commit message, caught by > > checkpatch. > >=20 > > Signed-off-by: Morten Br=F8rup >=20 > I am retracting this second part of the patch series, and reopening the o= riginal patch instead. This second part is probably not going to make it to= 22.11 anyway. Indeed, I have decided to take patch 1 only, which is reviewed. > Instead, I am going to provide another patch series (after 22.11) to spli= t the current RTE_LIBRTE_MEMPOOL_DEBUG define in two: RTE_LIBRTE_MEMPOOL_ST= ATS for statistics, and RTE_LIBRTE_MEMPOOL_DEBUG for debugging. And then th= is patch can be added to the RTE_LIBRTE_MEMPOOL_STATS.