From: Hua Zhong Date: Fri, 23 Jun 2006 09:05:42 +0000 (-0700) Subject: [PATCH] remove unlikely() in might_sleep_if() X-Git-Tag: v3.12-rc1~35856^2~45 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=368a5fa1f28589e6b54588a139ea872d5b4b1914;p=kernel%2Fkernel-generic.git [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: Hua Zhong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 25fccd8..8c21aaa 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -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); \