projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f56df2f
)
Revert "[PATCH] mm: micro optimise zone_watermark_ok"
author
Linus Torvalds
<
[email protected]
>
Thu, 1 Feb 2007 00:43:36 +0000
(16:43 -0800)
committer
Linus Torvalds
<
[email protected]
>
Thu, 1 Feb 2007 00:46:40 +0000
(16:46 -0800)
This reverts commit
e80ee884ae0e3794ef2b65a18a767d502ad712ee
.
Pawel Sikora had a boot-time oops due to it - because the sign change
invalidates the following comparisons, since 'free_pages' can be
negative.
The micro-optimization just isn't worth it.
Bisected-by: Pawel Sikora <
[email protected]
>
Acked-by: Andrew Morton <
[email protected]
>
Cc: Nick Piggin <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/page_alloc.c
patch
|
blob
|
history
diff --git
a/mm/page_alloc.c
b/mm/page_alloc.c
index fc5b5442e9421efc9044eed23e3a188fffe5cce7..2c606cc922a50cc212b6f4abd6e8635356ebb99e 100644
(file)
--- a/
mm/page_alloc.c
+++ b/
mm/page_alloc.c
@@
-989,8
+989,7
@@
int zone_watermark_ok(struct zone *z, int order, unsigned long mark,
int classzone_idx, int alloc_flags)
{
/* free_pages my go negative - that's OK */
- unsigned long min = mark;
- long free_pages = z->free_pages - (1 << order) + 1;
+ long min = mark, free_pages = z->free_pages - (1 << order) + 1;
int o;
if (alloc_flags & ALLOC_HIGH)