-----Original Message----- > Date: Wed, 14 Mar 2018 13:06:35 +0000 > From: "Laatz, Kevin" <kevin.la...@intel.com> > To: Vipin Varghese <vipin.vargh...@intel.com> > CC: dev@dpdk.org, harry.van.haa...@intel.com > Subject: Re: [dpdk-dev] [PATCH] event/sw: add unlikely branch predict > User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 > Thunderbird/52.6.0 > > > On 27/02/2018 20:08, Vipin Varghese wrote: > > For most run cases 'sw->started' holds true. Adding a branch prediction > > suggestion to compiler helps as this is first conditional check just > > after entering the function. > > > > Signed-off-by: Vipin Varghese <vipin.vargh...@intel.com> > > --- > > drivers/event/sw/sw_evdev_scheduler.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/event/sw/sw_evdev_scheduler.c > > b/drivers/event/sw/sw_evdev_scheduler.c > > index 3106eb3..17bd4c0 100644 > > --- a/drivers/event/sw/sw_evdev_scheduler.c > > +++ b/drivers/event/sw/sw_evdev_scheduler.c > > @@ -508,7 +508,7 @@ sw_event_schedule(struct rte_eventdev *dev) > > uint32_t i; > > sw->sched_called++; > > - if (!sw->started) > > + if (unlikely(!sw->started)) > > return; > > do { > > Acked-by: Kevin Laatz <kevin.la...@intel.com>
Applied to dpdk-next-eventdev/master. Thanks.