mm-compaction-determine-isolation-mode-only-once.patch removed from -mm tree
Subsystems (2)
[email protected]
maintainerSubject: [merged] mm-compaction-determine-isolation-mode-only-once.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 08 Apr 2014 13:47:07 -0700
The patch titled
Subject: mm, compaction: determine isolation mode only once
has been removed from the -mm tree. Its filename was
mm-compaction-determine-isolation-mode-only-once.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: David Rientjes <[email protected]>
Subject: mm, compaction: determine isolation mode only once
The conditions that control the isolation mode in isolate_migratepages_range() do not change during the iteration, so extract them out and only define the value once.
This actually does have an effect, gcc doesn't optimize it itself because of cc->sync.
---
mm/compaction.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
mm/compaction.c renamed from mm/compaction.c~mm-compaction-determine-isolation-mode-only-once +2 -6
@@ -460,12 +460,13 @@ isolate_migratepages_range(struct zone *unsigned long last_pageblock_nr =0 , pageblock_nr;unsigned long nr_scanned =0 , nr_isolated =0 ;struct list_head *migratelist = &cc->migratepages; -isolate_mode_t mode =0 ;struct lruvec *lruvec;unsigned long flags;bool locked = false;struct page *page =NULL , *valid_page =NULL ;bool skipped_async_unsuitable = false; +const isolate_mode_t mode = (!cc->sync ?ISOLATE_ASYNC_MIGRATE :0 ) | + (unevictable ?ISOLATE_UNEVICTABLE :0 );/* * Ensure that there are not too many pages isolated from the LRU
@@ -608,12 +609,6 @@ isolate_migratepages_range(struct zone *continue ; } -if (!cc->sync) - mode |=ISOLATE_ASYNC_MIGRATE ; - -if (unevictable) - mode |=ISOLATE_UNEVICTABLE ;