From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id A0B495589 for ; Tue, 10 Jan 2017 16:14:42 +0100 (CET) Received: by mail-wm0-f49.google.com with SMTP id c206so76958705wme.0 for ; Tue, 10 Jan 2017 07:14:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:date:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZDvlklzHmnw0/K20lVOSpLLqlGhgrqF7q7PuziTJSeo=; b=QRkRZmD1IOkB4CZB1PJ5J+5fQge6IfqLR6IwQHKowbwcxVdceMWSoAC9jwAJA0Ic5N BkpcXCElcuAfY0mttr34bm2S37c71o0+z2JrpS5dgosjDVcZynDShnQl7gbBP2Y2etEa OkNiAxg7fD9g/k1EjTiPI3Oz+LoaqdXP17jbRn9xfdrLuWICuZV+VzIkt1VySOg4vA0G M9zyjNuNixyzyRLWPwBBwIBn/6N6ve+WLCu+Qg363+StXtC4QSmyWoqZIVVZpaLH/0tu 2zJcPtHDNfCR0OGEv406y0IizzsriqD0ppt/Yqc9FW8LpRQ1ZPD27Vzuhr1/EbplOG3H uTiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZDvlklzHmnw0/K20lVOSpLLqlGhgrqF7q7PuziTJSeo=; b=XQxK/OO4OynoLTOPYg1kNLUKlHk4bkkRcwW2myyaI11FoYocWJ6+AJKfvylZDKEDx7 DicH73YjIHLOkyar7lgdWf0+WhhYhqfoahZLG3x4ABc7sx4DbWYNd/mBjgSAN8T44Y3S uE+NUUYlRmGBysQsM7vrPsxymY3pGLO/piNRPCv7TLKKZj02UhKEJfj8ksKsuY3Ys6dw 4xUQgVhnDXZg3Q4AKWXRmDQA82tiiVNreI7L6j0vzNTlUO7IlMONBvMKs3DItt9StKDm ZDVP21b9LdhNKffkXm0UN+4MGQXQkvoHSu+mH/poAxDMW7cdRCgn1nFe44DHjlnzFcAO q1Ng== X-Gm-Message-State: AIkVDXKiLBM9KE8Xnm30maOoGAovgD2bjXLybPs2o6s0rGEcBky4dSenBm8t1T92iCYf2olQ X-Received: by 10.28.93.202 with SMTP id r193mr287409wmb.30.1484061282397; Tue, 10 Jan 2017 07:14:42 -0800 (PST) Received: from glumotte.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id f76sm4264061wmd.15.2017.01.10.07.14.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Jan 2017 07:14:42 -0800 (PST) From: Olivier MATZ X-Google-Original-From: Olivier MATZ Date: Tue, 10 Jan 2017 16:14:34 +0100 To: Wenfeng Liu Cc: , , , "konstantin.ananyev@intel.com" Message-ID: <20170110161434.1b190c49@glumotte.dev.6wind.com> In-Reply-To: <1484036802-3031-1-git-send-email-liuwf@arraynetworks.com.cn> References: <1484032450-1329-1-git-send-email-liuwf@arraynetworks.com.cn> <1484036802-3031-1-git-send-email-liuwf@arraynetworks.com.cn> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3] mempool: don't check mempool flags when cache is enabled X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 15:14:42 -0000 Hi Wengfeng, On Tue, 10 Jan 2017 08:26:42 +0000, Wenfeng Liu wrote: > Currently we will check mempool flags when we put/get objects from > mempool. However, this makes cache useless when mempool is SC|SP, > SC|MP, MC|SP cases. > This patch makes cache available in above cases and improves > performance. > > Signed-off-by: Wenfeng Liu I agree with you and Konstantin. This should enhance performance in single consumer/producer mode. > @@ -1104,10 +1100,10 @@ static inline void > __attribute__((always_inline)) */ > static inline void __attribute__((always_inline)) > rte_mempool_generic_put(struct rte_mempool *mp, void * const > *obj_table, > - unsigned n, struct rte_mempool_cache *cache, > int flags) > + unsigned n, struct rte_mempool_cache *cache, > __rte_unused int flags) { Small nit, seen with checkpatch: WARNING:LONG_LINE: line over 80 characters #43: FILE: lib/librte_mempool/rte_mempool.h:1103: + unsigned n, struct rte_mempool_cache *cache, __rte_unused int flags) The other warnings (Prefer 'unsigned int' to bare use of 'unsigned') can be ignored, since it's not coming from your patch. While there, I suggest another title that better reflects what is done: "mempool: use cache in single producer or consumer mode" Thanks, Olivier