Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 368a5fa1 authored by Hua Zhong's avatar Hua Zhong Committed by Linus Torvalds
Browse files

[PATCH] remove unlikely() in might_sleep_if()



The likely() profiling tools show that __alloc_page() causes a lot of misses:

!       132    119193 __alloc_pages():mm/page_alloc.c@937

Because most __alloc_page() calls are not atomic.

Signed-off-by: default avatarHua Zhong <hzhong@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0216bfcf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ extern int cond_resched(void);
# define might_sleep() do { might_resched(); } while (0)
#endif

#define might_sleep_if(cond) do { if (unlikely(cond)) might_sleep(); } while (0)
#define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0)

#define abs(x) ({				\
		int __x = (x);			\