From: Vipin Varghese Date: Tue, 27 Feb 2018 20:08:05 +0000 (+0530) Subject: event/sw: add unlikely branch predict X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=63ddc002391359e5b2bb375b63939eb4e911a709;p=dpdk.git event/sw: add unlikely branch predict 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 Acked-by: Kevin Laatz --- diff --git a/drivers/event/sw/sw_evdev_scheduler.c b/drivers/event/sw/sw_evdev_scheduler.c index 3106eb3376..17bd4c0a64 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 {