Re: [PATCH -V8 04/10] mm/migrate: make migrate_pages() return nr_succeeded
From: Oscar Salvador <osalvador@suse.de>
Date: 2021-06-18 07:53:44
Also in:
lkml
From: Oscar Salvador <osalvador@suse.de>
Date: 2021-06-18 07:53:44
Also in:
lkml
On Fri, Jun 18, 2021 at 02:15:31PM +0800, Huang Ying wrote:
From: Yang Shi <redacted> The migrate_pages() returns the number of pages that were not migrated, or an error code. When returning an error code, there is no way to know how many pages were migrated or not migrated. In the following patch, migrate_pages() is used to demote pages to PMEM node, we need account how many pages are reclaimed (demoted) since page reclaim behavior depends on this. Add *nr_succeeded parameter to make migrate_pages() return how many pages are demoted successfully for all cases. Signed-off-by: Yang Shi <redacted> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Signed-off-by: "Huang, Ying" <redacted> Reviewed-by: Yang Shi <redacted> Cc: Michal Hocko <mhocko@suse.com> Cc: Wei Xu <weixugc@google.com> Cc: Dan Williams <redacted> Cc: David Hildenbrand <redacted> Cc: osalvador <osalvador@suse.de>
I thought we all agreed on making nr_succeed an optional argument [1]. It reduced the churn quite a lot. [1] https://patchwork.kernel.org/comment/24104453/ -- Oscar Salvador SUSE L3