[dpdk-dev] [PATCH] mbuf: optimize refcnt handling during free

2015-03-27 Thread Olivier MATZ
rch 27, 2015 10:26 AM >>> To: Wiles, Keith >>> Cc: dev at dpdk.org >>> Subject: Re: [dpdk-dev] [PATCH] mbuf: optimize refcnt handling during free >>> >>> On Thu, Mar 26, 2015 at 09:00:33PM +, Wiles, Keith wrote: >>>> >>>> >>

[dpdk-dev] [PATCH] mbuf: optimize refcnt handling during free

2015-03-27 Thread Ananyev, Konstantin
> -Original Message- > From: Richardson, Bruce > Sent: Friday, March 27, 2015 1:17 PM > To: Olivier MATZ > Cc: Neil Horman; Ananyev, Konstantin; dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH] mbuf: optimize refcnt handling during free > > On Fri, Mar 27,

[dpdk-dev] [PATCH] mbuf: optimize refcnt handling during free

2015-03-27 Thread Bruce Richardson
; From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Neil Horman > >>> Sent: Friday, March 27, 2015 10:26 AM > >>> To: Wiles, Keith > >>> Cc: dev at dpdk.org > >>> Subject: Re: [dpdk-dev] [PATCH] mbuf: optimize refcnt handling during free > &

[dpdk-dev] [PATCH] mbuf: optimize refcnt handling during free

2015-03-27 Thread Olivier MATZ
Hi Neil, On 03/27/2015 11:25 AM, Neil Horman wrote: > On Thu, Mar 26, 2015 at 09:00:33PM +, Wiles, Keith wrote: >> >> >> On 3/26/15, 1:10 PM, "Zoltan Kiss" wrote: >> >>> The current way is not the most efficient: if m->refcnt is 1, the second >>> condition never evaluates, and we set it to 0.

[dpdk-dev] [PATCH] mbuf: optimize refcnt handling during free

2015-03-27 Thread Ananyev, Konstantin
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Neil Horman > Sent: Friday, March 27, 2015 10:26 AM > To: Wiles, Keith > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH] mbuf: optimize refcnt handling during free > > On Thu, Ma

[dpdk-dev] [PATCH] mbuf: optimize refcnt handling during free

2015-03-27 Thread Neil Horman
dpdk.org > > Subject: Re: [dpdk-dev] [PATCH] mbuf: optimize refcnt handling during free > > > > On Thu, Mar 26, 2015 at 09:00:33PM +, Wiles, Keith wrote: > > > > > > > > > On 3/26/15, 1:10 PM, "Zoltan Kiss" wrote: > > > > > &g

[dpdk-dev] [PATCH] mbuf: optimize refcnt handling during free

2015-03-27 Thread Neil Horman
On Thu, Mar 26, 2015 at 09:00:33PM +, Wiles, Keith wrote: > > > On 3/26/15, 1:10 PM, "Zoltan Kiss" wrote: > > >The current way is not the most efficient: if m->refcnt is 1, the second > >condition never evaluates, and we set it to 0. If refcnt > 1, the 2nd > >condition fails again, although

[dpdk-dev] [PATCH] mbuf: optimize refcnt handling during free

2015-03-26 Thread Bruce Richardson
On Thu, Mar 26, 2015 at 09:00:33PM +, Wiles, Keith wrote: > > > On 3/26/15, 1:10 PM, "Zoltan Kiss" wrote: > > >The current way is not the most efficient: if m->refcnt is 1, the second > >condition never evaluates, and we set it to 0. If refcnt > 1, the 2nd > >condition fails again, although

[dpdk-dev] [PATCH] mbuf: optimize refcnt handling during free

2015-03-26 Thread Wiles, Keith
On 3/26/15, 1:10 PM, "Zoltan Kiss" wrote: >The current way is not the most efficient: if m->refcnt is 1, the second >condition never evaluates, and we set it to 0. If refcnt > 1, the 2nd >condition fails again, although the code suggest otherwise to branch >prediction. Instead we should keep th

[dpdk-dev] [PATCH] mbuf: optimize refcnt handling during free

2015-03-26 Thread Zoltan Kiss
The current way is not the most efficient: if m->refcnt is 1, the second condition never evaluates, and we set it to 0. If refcnt > 1, the 2nd condition fails again, although the code suggest otherwise to branch prediction. Instead we should keep the second condition only, and remove the duplicate