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 4D8DEA0542; Sun, 9 Oct 2022 15:37:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D6EBF41141; Sun, 9 Oct 2022 15:37:45 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 0CF5040042 for ; Sun, 9 Oct 2022 15:37:43 +0200 (CEST) Received: by shelob.oktetlabs.ru (Postfix, from userid 115) id 3735F88; Sun, 9 Oct 2022 16:37:41 +0300 (MSK) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mail1.oktetlabs.ru X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_DISCARD autolearn=no autolearn_force=no version=3.4.6 Received: from aros.oktetlabs.ru (aros.oktetlabs.ru [192.168.38.17]) by shelob.oktetlabs.ru (Postfix) with ESMTP id 194C866; Sun, 9 Oct 2022 16:37:41 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 194C866 Authentication-Results: shelob.oktetlabs.ru/194C866; dkim=none; dkim-atps=neutral From: Andrew Rybchenko To: Olivier Matz Cc: dev@dpdk.org, =?UTF-8?q?Morten=20Br=C3=B8rup?= , Bruce Richardson Subject: [PATCH v6 0/4] mempool: fix mempool cache flushing algorithm Date: Sun, 9 Oct 2022 16:37:33 +0300 Message-Id: <20221009133737.795377-1-andrew.rybchenko@oktetlabs.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D86DB2@smartserver.smartshare.dk> References: <98CBD80474FA8B44BF855DF32C47DC35D86DB2@smartserver.smartshare.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 v6 changes (Andrew Rybchenko): - Fix spelling v5 changes (Andrew Rybchenko): - Factor out cosmetic fixes into separate patches to make all patches smaller and easier to review - Remove extra check as per review notes - Factor out entire cache flushing into a separate patch. It is nice from logical changes separation point of view, easier to bisect and revert. v4 changes: - Updated patch title to reflect that the scope of the patch is only mempool cache flushing. - Do not replace rte_memcpy() with alternative copying method. This was a pure optimization, not a fix. - Elaborate even more on the bugs fixed by the modifications. - Added 4th bullet item to the patch description, regarding rte_mempool_ops_enqueue_bulk() with RTE_LIBRTE_MEMPOOL_DEBUG. v3 changes: - Actually remove my modifications of the rte_mempool_cache structure. v2 changes: - Not adding the new objects to the mempool cache before flushing it also allows the memory allocated for the mempool cache to be reduced from 3 x to 2 x RTE_MEMPOOL_CACHE_MAX_SIZE. However, such this change would break the ABI, so it was removed in v2. - The mempool cache should be cache line aligned for the benefit of the copying method, which on some CPU architectures performs worse on data crossing a cache boundary. However, such this change would break the ABI, so it was removed in v2; and yet another alternative copying method replaced the rte_memcpy(). Andrew Rybchenko (3): mempool: check driver enqueue result in one place mempool: avoid usage of term ring on put mempool: flush cache completely on overflow Morten Brørup (1): mempool: fix cache flushing algorithm lib/mempool/rte_mempool.c | 5 ++++ lib/mempool/rte_mempool.h | 55 ++++++++++++++++++++------------------- 2 files changed, 33 insertions(+), 27 deletions(-) -- 2.30.2