[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200214003017.25558-2-richardw.yang@linux.intel.com>
Date: Fri, 14 Feb 2020 08:30:14 +0800
From: Wei Yang <richardw.yang@...ux.intel.com>
To: akpm@...ux-foundation.org
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org, mhocko@...e.com,
yang.shi@...ux.alibaba.com, rientjes@...gle.com, david@...hat.com,
Wei Yang <richardw.yang@...ux.intel.com>
Subject: [Patch v5 1/4] mm/migrate.c: no need to check for i > start in do_pages_move()
At this point, we always have i >= start. If i == start, store_status()
will return 0. So we can drop the check for i > start.
[david@...hat.com rephrase changelog]
Signed-off-by: Wei Yang <richardw.yang@...ux.intel.com>
Acked-by: Michal Hocko <mhocko@...e.com>
Reviewed-by: David Hildenbrand <david@...hat.com>
---
mm/migrate.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index b1092876e537..6d466de4d1d0 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1675,11 +1675,9 @@ static int do_pages_move(struct mm_struct *mm, nodemask_t task_nodes,
err += nr_pages - i - 1;
goto out;
}
- if (i > start) {
- err = store_status(status, start, current_node, i - start);
- if (err)
- goto out;
- }
+ err = store_status(status, start, current_node, i - start);
+ if (err)
+ goto out;
current_node = NUMA_NO_NODE;
}
out_flush:
--
2.17.1
Powered by blists - more mailing lists