From: Hua Zhong Date: Fri, 23 Jun 2006 09:05:42 +0000 (-0700) Subject: [PATCH] remove unlikely() in might_sleep_if() X-Git-Tag: v2.6.18-rc1~1081^2~45 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=368a5fa1f28589e6b54588a139ea872d5b4b1914;p=linux-2.6-omap-h63xx.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 25fccd859fb..8c21aaa248b 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); \