From: "Laatz, Kevin" <kevin.laatz@intel.com>
To: Vipin Varghese <vipin.varghese@intel.com>
Cc: dev@dpdk.org, harry.van.haaren@intel.com
Subject: Re: [dpdk-dev] [PATCH] event/sw: add unlikely branch predict
Date: Wed, 14 Mar 2018 13:06:35 +0000 [thread overview]
Message-ID: <39dc23d4-bac3-7571-eaa8-a05c9f793efc@intel.com> (raw)
In-Reply-To: <1519762085-77659-1-git-send-email-vipin.varghese@intel.com>
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.varghese@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.laatz@intel.com>
next prev parent reply other threads:[~2018-03-14 13:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-27 20:08 Vipin Varghese
2018-03-14 13:06 ` Laatz, Kevin [this message]
2018-03-20 5:39 ` Jerin Jacob
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=39dc23d4-bac3-7571-eaa8-a05c9f793efc@intel.com \
--to=kevin.laatz@intel.com \
--cc=dev@dpdk.org \
--cc=harry.van.haaren@intel.com \
--cc=vipin.varghese@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).