Skip to contentSkip to conversation

mm-remove-unlikely-from-the-current_order-test.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jul 9, 2013

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: [merged] mm-remove-unlikely-from-the-current_order-test.patch removed from -mm tree
To: [email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 09 Jul 2013 16:19:55 -0700

The patch titled
Subject: mm/page_alloc.c: remove unlikely() from the current_order test
has been removed from the -mm tree. Its filename was
mm-remove-unlikely-from-the-current_order-test.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Zhang Yanfei <[email protected]>
Subject: mm/page_alloc.c: remove unlikely() from the current_order test

In __rmqueue_fallback(), current_order loops down from MAX_ORDER - 1 to the order passed. MAX_ORDER is typically 11 and pageblock_order is typically 9 on x86. Integer division truncates, so pageblock_order / 2 is
4. For the first eight iterations, it's guaranteed that current_order >= pageblock_order / 2 if it even gets that far!

So just remove the unlikely(), it's completely bogus.

---

 mm/page_alloc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/page_alloc.c renamed from mm/page_alloc.c~mm-remove-unlikely-from-the-current_order-test +1 -1
diff -puN mm/page_alloc.c~mm-remove-unlikely-from-the-current_order-test mm/page_alloc.c
@@ -1046,7 +1046,7 @@ __rmqueue_fallback(struct zone *zone, in
 			 * MIGRATE_CMA areas.
 			 */
 			if (!is_migrate_cma(migratetype) &&
-			    (unlikely(current_order >= pageblock_order / 2) ||
+			    (current_order >= pageblock_order / 2 ||
 			     start_migratetype == MIGRATE_RECLAIMABLE ||
 			     page_group_by_mobility_disabled)) {
 				int pages;

_

Patches currently in -mm which might be from [email protected] are

origin.patch
linux-next.patch