From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <cunming.liang@intel.com>
Received: from mga02.intel.com (mga02.intel.com [134.134.136.20])
 by dpdk.org (Postfix) with ESMTP id 591B058F4
 for <dev@dpdk.org>; Tue, 10 Feb 2015 03:57:47 +0100 (CET)
Received: from fmsmga002.fm.intel.com ([10.253.24.26])
 by orsmga101.jf.intel.com with ESMTP; 09 Feb 2015 18:57:46 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.09,547,1418112000"; d="scan'208";a="675462980"
Received: from pgsmsx107.gar.corp.intel.com ([10.221.44.105])
 by fmsmga002.fm.intel.com with ESMTP; 09 Feb 2015 18:57:45 -0800
Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by
 PGSMSX107.gar.corp.intel.com (10.221.44.105) with Microsoft SMTP Server (TLS)
 id 14.3.195.1; Tue, 10 Feb 2015 10:57:04 +0800
Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.62]) by
 SHSMSX101.ccr.corp.intel.com ([169.254.1.192]) with mapi id 14.03.0195.001;
 Tue, 10 Feb 2015 10:57:04 +0800
From: "Liang, Cunming" <cunming.liang@intel.com>
To: Olivier MATZ <olivier.matz@6wind.com>, "dev@dpdk.org" <dev@dpdk.org>
Thread-Topic: [dpdk-dev] [PATCH v4 14/17] mempool: add support to non-EAL
 thread
Thread-Index: AQHQPox1yH9hMxbWjEyYvol39Fg4LZzmsNiAgAG8vID//7F1AIABHjFA
Date: Tue, 10 Feb 2015 02:57:03 +0000
Message-ID: <D0158A423229094DA7ABF71CF2FA0DA3118D8227@shsmsx102.ccr.corp.intel.com>
References: <1422491072-5114-1-git-send-email-cunming.liang@intel.com>
 <1422842559-13617-1-git-send-email-cunming.liang@intel.com>
 <1422842559-13617-15-git-send-email-cunming.liang@intel.com>
 <54D7C099.60009@6wind.com>
 <D0158A423229094DA7ABF71CF2FA0DA3118D7F20@shsmsx102.ccr.corp.intel.com>
 <54D8F3C8.4000101@6wind.com>
In-Reply-To: <54D8F3C8.4000101@6wind.com>
Accept-Language: zh-CN, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [10.239.127.40]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-dev] [PATCH v4 14/17] mempool: add support to non-EAL
 thread
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Feb 2015 02:57:47 -0000



> -----Original Message-----
> From: Olivier MATZ [mailto:olivier.matz@6wind.com]
> Sent: Tuesday, February 10, 2015 1:52 AM
> To: Liang, Cunming; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v4 14/17] mempool: add support to non-EAL
> thread
>=20
> Hi,
>=20
> On 02/09/2015 03:41 PM, Liang, Cunming wrote:
> >>>  #ifdef RTE_LIBRTE_MEMPOOL_DEBUG
> >>> -#define __MEMPOOL_STAT_ADD(mp, name, n) do {			\
> >>> -		unsigned __lcore_id =3D rte_lcore_id();		\
> >>> -		mp->stats[__lcore_id].name##_objs +=3D n;		\
> >>> -		mp->stats[__lcore_id].name##_bulk +=3D 1;		\
> >>> +#define __MEMPOOL_STAT_ADD(mp, name, n) do {                    \
> >>> +		unsigned __lcore_id =3D rte_lcore_id();           \
> >>> +		if (__lcore_id < RTE_MAX_LCORE) {               \
> >>> +			mp->stats[__lcore_id].name##_objs +=3D n;	\
> >>> +			mp->stats[__lcore_id].name##_bulk +=3D 1;	\
> >>> +		}                                               \
> >>
> >> Does it mean that we have no statistics for non-EAL threads?
> >> (same question for rings and timers in the next patches)
> > [LCM] Yes, it is in this patch set, mainly focus on EAL thread and make=
 sure no
> running issue on non-EAL thread.
> > For full non-EAL function, will have other patch set to enhance non-EAL=
 thread
> as the 2nd step.
>=20
> OK
>=20
> >>> @@ -952,7 +955,8 @@ __mempool_get_bulk(struct rte_mempool *mp,
> void
> >> **obj_table,
> >>>  	uint32_t cache_size =3D mp->cache_size;
> >>>
> >>>  	/* cache is not enabled or single consumer */
> >>> -	if (unlikely(cache_size =3D=3D 0 || is_mc =3D=3D 0 || n >=3D cache_=
size))
> >>> +	if (unlikely(cache_size =3D=3D 0 || is_mc =3D=3D 0 ||
> >>> +		     n >=3D cache_size || lcore_id >=3D RTE_MAX_LCORE))
> >>>  		goto ring_dequeue;
> >>>
> >>>  	cache =3D &mp->local_cache[lcore_id];
> >>>
> >>
> >> What is the performance impact of adding this test?
> > [LCM] By perf in unit test, it's almost the same. But haven't measure E=
AL thread
> and non-EAL thread share the same mempool.
>=20
>=20
> When you say "unit test", are you talking about mempool tests from
> "make test"? Do you have some numbers to share?
[LCM] I means DPDK app/test, run mempool_perf_test. Will add numbers on v5.