On 07/29/2013 05:36 PM, Cody P Schafer wrote:
On 07/29/2013 03:45 PM, Dave Hansen wrote:
On 07/28/2013 07:48 AM, SeungHun Lee wrote:
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index b8475ed..e644cf5 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2408,7 +2408,7 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned
int order,
* be using allocators in order of preference for an area that is
* too large.
*/
- if (order >= MAX_ORDER) {
+ if (unlikely(order >= MAX_ORDER)) {
WARN_ON_ONCE(!(gfp_mask & __GFP_NOWARN));
return NULL;
}
What problem is this patch solving? I can see doing this in hot paths,
or places where the compiler is known to be generating bad or suboptimal
code. but, this costs me 512 bytes of text size:
898384 Jul 29 15:40 mm/page_alloc.o.nothing
898896 Jul 29 15:40 mm/page_alloc.o.unlikely
[...]
-rw-rw-r-- 1 cody cody 2942208 Jul 29 17:33 normal/arch/x86/boot/bzImage
-rw-rw-r-- 1 cody cody 2942208 Jul 29 17:33 unlikely/arch/x86/boot/bzImage
So I screwed this last one up and didn't reapply/unapply the patch, so
they probably are actually different sizes. I'll run a build and check
tomorrow.
I really don't think we should be adding these without having _concrete_
reasons for it.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>