From: Hua Zhong Date: Fri, 23 Jun 2006 09:05:42 +0000 (-0700) Subject: [PATCH] remove unlikely() in might_sleep_if() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=368a5fa1f28589e6b54588a139ea872d5b4b1914;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.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); \