From: Olivier MATZ <olivier.matz@6wind.com>
To: Wenfeng Liu <liuwf@arraynetworks.com.cn>
Cc: <konstantin.ananyev@intel.com>, <olivier.matz@6wind.com>,
<dev@dpdk.org>,
"konstantin.ananyev@intel.com" <konstantin.ananyev@intel.com>
Subject: Re: [PATCH v3] mempool: don't check mempool flags when cache is enabled
Date: Tue, 10 Jan 2017 16:14:34 +0100 [thread overview]
Message-ID: <20170110161434.1b190c49@glumotte.dev.6wind.com> (raw)
In-Reply-To: <1484036802-3031-1-git-send-email-liuwf@arraynetworks.com.cn>
Hi Wengfeng,
On Tue, 10 Jan 2017 08:26:42 +0000, Wenfeng Liu
<liuwf@arraynetworks.com.cn> 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 <liuwf@arraynetworks.com.cn>
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
next prev parent reply other threads:[~2017-01-10 15:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-09 10:24 [PATCH] mempool: try to get objects from cache when the mempool is single consumer and multiple producer Wenfeng Liu
2017-01-09 10:36 ` Ananyev, Konstantin
2017-01-10 7:14 ` [PATCH v2] mempool: don't check mempool flags when cache is enabled Wenfeng Liu
2017-01-10 8:26 ` [PATCH v3] " Wenfeng Liu
2017-01-10 15:14 ` Olivier MATZ [this message]
2017-01-11 2:25 ` [PATCH v4] mempool: use cache in single producer or consumer mode Wenfeng Liu
2017-01-13 15:23 ` Olivier Matz
2017-01-13 15:34 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170110161434.1b190c49@glumotte.dev.6wind.com \
--to=olivier.matz@6wind.com \
--cc=dev@dpdk.org \
--cc=konstantin.ananyev@intel.com \
--cc=liuwf@arraynetworks.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.