linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] mm/compaction: Rename 'start_pfn' to 'iteration_start_pfn' in compact_zone()
@ 2020-10-19 11:50 yanfei.xu
  2020-10-19 11:54 ` David Hildenbrand
  0 siblings, 1 reply; 2+ messages in thread
From: yanfei.xu @ 2020-10-19 11:50 UTC (permalink / raw)
  To: akpm, david, vbabka, pankaj.gupta.linux; +Cc: linux-mm, linux-kernel

From: Yanfei Xu <yanfei.xu@windriver.com>

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.

Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
Acked-by: David Hildenbrand <david@redhat.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
---
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(-)

diff --git a/mm/compaction.c b/mm/compaction.c
index 6e0ee5641788..ee1f8439369e 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -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,
-- 
2.18.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v3] mm/compaction: Rename 'start_pfn' to 'iteration_start_pfn' in compact_zone()
  2020-10-19 11:50 [PATCH v3] mm/compaction: Rename 'start_pfn' to 'iteration_start_pfn' in compact_zone() yanfei.xu
@ 2020-10-19 11:54 ` David Hildenbrand
  0 siblings, 0 replies; 2+ messages in thread
From: David Hildenbrand @ 2020-10-19 11:54 UTC (permalink / raw)
  To: yanfei.xu, akpm, vbabka, pankaj.gupta.linux; +Cc: linux-mm, linux-kernel

On 19.10.20 13:50, yanfei.xu@windriver.com wrote:
> From: Yanfei Xu <yanfei.xu@windriver.com>
> 
> 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.
> 
> Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
> Acked-by: David Hildenbrand <david@redhat.com>

^ huh, where does that come from? (you should only add acks in case they
were explicitly spelled out)

Anyhow, now you can keep it :)

Acked-by: David Hildenbrand <david@redhat.com>


-- 
Thanks,

David / dhildenb



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-19 11:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-19 11:50 [PATCH v3] mm/compaction: Rename 'start_pfn' to 'iteration_start_pfn' in compact_zone() yanfei.xu
2020-10-19 11:54 ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).