mm/compaction: Rename 'start_pfn' to 'iteration_start_pfn' in compact_zone()
Subsystems (2)
PATCH v3 1/1 mm/compaction: Rename 'start_pfn' to 'iteration_start_pfn' in compact_zone()
From: Yanfei Xu <[email protected]>
There are two 'start_pfn' declared in compact_zone() which have different meaning. Rename the second one to 'iteration_start_pfn' to prevent confusion.
BTW, remove an useless semicolon.
---v1->v2:
Rename 'start_pfn' to 'iteration_start_pfn'.v2->v3:
improves commit messages.
mm/compaction.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
mm/compaction.c +3 -4
@@ -2271,7 +2271,7 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)while ((ret =compact_finished (cc)) ==COMPACT_CONTINUE ) {int err; -unsigned long start_pfn = cc->migrate_pfn; +unsigned long iteration_start_pfn = cc->migrate_pfn;/* * Avoid multiple rescans which can happen if a page cannot be
@@ -2283,7 +2283,7 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)*/ cc->rescan = false;if (pageblock_start_pfn (last_migrated_pfn) == -pageblock_start_pfn (start_pfn)) { +pageblock_start_pfn (iteration_start_pfn)) { cc->rescan = true; }
@@ -2307,8 +2307,7 @@ compact_zone(struct compact_control *cc, struct capture_control *capc) goto check_drain;case ISOLATE_SUCCESS : update_cached = false; - last_migrated_pfn = start_pfn; - ; + last_migrated_pfn = iteration_start_pfn; } err = migrate_pages(&cc->migratepages, compaction_alloc,
Signature · 1 line
2.18.2
Quoted 10 lines · On 19.10.20 13:50, [email protected] wrote:
From: Yanfei Xu <[email protected]>
There are two '
start_pfn' declared incompact_zone()which have different meaning. Rename the second one to 'iteration_start_pfn' to prevent confusion.BTW, remove an useless semicolon.
Signed-off-by Yanfei Xu <[email protected]>
^ huh, where does that come from? (you should only add acks in case they were explicitly spelled out)
Anyhow, now you can keep it :)
Signature · 3 lines
Thanks, David / dhildenb