> On Jul 23, 2018, at 2:09 PM, Morten Brørup <m...@smartsharesystems.com> wrote:
> 
> I haven't performance tested, but they are compiler branch prediction hints 
> pointing out the most likely execution path, so I expect them to have a 
> positive effect.

We really need to make sure this provides any performance improvement and that 
means it needs to be tested on a number of systems. Can you please do some 
performance testing or see if we can get the guys doing DPDK performance 
testing to first give this a try? This area is very sensitive to tweaking.

> 
> E.g. the first comparison in __rte_pktmbuf_read() is very unlikely to be true 
> - it would mean that the application is trying to read data beyond the packet.
> 
> Please also refer to:
> https://cellperformance.beyond3d.com/articles/2006/04/branch-patterns-using-gcc.html
> 
> 
>> -----Original Message-----
>> From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Honnappa Nagarahalli
>> Sent: Monday, July 23, 2018 7:52 PM
>> To: Morten Brørup; Olivier Matz
>> Cc: dev@dpdk.org
>> Subject: Re: [dpdk-dev] rte_mbuf library likely()/unlikely()
>> 
>> Do you see any performance improvements with these changes?
>> 
>> -----Original Message-----
>> From: dev <dev-boun...@dpdk.org> On Behalf Of Morten Brørup
>> Sent: Monday, July 23, 2018 8:54 AM
>> To: Olivier Matz <olivier.m...@6wind.com>
>> Cc: dev@dpdk.org
>> Subject: [dpdk-dev] rte_mbuf library likely()/unlikely()
>> 
>> Hi Olivier,
>> 
>> 
>> 
>> I noticed that __rte_pktmbuf_read() could do with an unlikely(), so I went
>> through the entire library. Here are my suggested modifications.
>> 

Regards,
Keith

Reply via email to