summaryrefslogtreecommitdiffstats
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
authorHua Zhong2006-06-23 11:05:42 +0200
committerLinus Torvalds2006-06-23 16:43:06 +0200
commit368a5fa1f28589e6b54588a139ea872d5b4b1914 (patch)
tree346923893f4814dffb51049f92f81c327374e60c /include/linux/kernel.h
parent[PATCH] percpu counter data type changes to suppport more than 2**31 ext3 fre... (diff)
downloadkernel-qcow2-linux-368a5fa1f28589e6b54588a139ea872d5b4b1914.tar.gz
kernel-qcow2-linux-368a5fa1f28589e6b54588a139ea872d5b4b1914.tar.xz
kernel-qcow2-linux-368a5fa1f28589e6b54588a139ea872d5b4b1914.zip
[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 <hzhong@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 25fccd859fbf..8c21aaa248b4 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); \