lkml.org 
[lkml]   [2018]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
From
Subject[PATCH 01/35] jump_label: Add branch hints to static_branch_{un,}likely()
For some reason these were missing, I've not observed this patch
making a difference in the few code locations I checked, but this
makes sense.

Cc: Jason Baron <jbaron@akamai.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
include/linux/jump_label.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/include/linux/jump_label.h
+++ b/include/linux/jump_label.h
@@ -388,7 +388,7 @@ extern bool ____wrong_branch_error(void)
branch = !arch_static_branch_jump(&(x)->key, true); \
else \
branch = ____wrong_branch_error(); \
- branch; \
+ likely(branch); \
})

#define static_branch_unlikely(x) \
@@ -400,7 +400,7 @@ extern bool ____wrong_branch_error(void)
branch = arch_static_branch(&(x)->key, false); \
else \
branch = ____wrong_branch_error(); \
- branch; \
+ unlikely(branch); \
})

#else /* !HAVE_JUMP_LABEL */

\
 
 \ /
  Last update: 2018-01-18 16:06    [W:0.331 / U:0.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site