lkml.org 
[lkml]   [2021]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH -V10 3/9] mm/migrate: enable returning precise migrate_pages() success count
Date
On 15 Jul 2021, at 1:51, Huang Ying wrote:

> From: Yang Shi <yang.shi@linux.alibaba.com>
>
> Under normal circumstances, migrate_pages() returns the number of
> pages migrated. In error conditions, it returns an error code. When
> returning an error code, there is no way to know how many pages were
> migrated or not migrated.
>
> Make migrate_pages() return how many pages are demoted successfully
> for all cases, including when encountering errors. Page reclaim
> behavior will depend on this in subsequent patches.
>
> Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com>
> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
> Signed-off-by: "Huang, Ying" <ying.huang@intel.com>
> Suggested-by: osalvador <osalvador@suse.de> [optional parameter]
> Reviewed-by: Yang Shi <shy828301@gmail.com>
> Cc: Michal Hocko <mhocko@suse.com>
> Cc: Wei Xu <weixugc@google.com>
> Cc: Zi Yan <ziy@nvidia.com>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: David Hildenbrand <david@redhat.com>
>
> --
>
> Note: Yang Shi originally wrote the patch, thus the SoB. There was
> also a Reviewed-by provided since there were some modifications made
> to this after the original work.
>
> Changes since 20210618:
> * Reword some bits of the changelog/subject
> * Allow callers to pass a NULL 'ret_succeeded'. This ensures that
> callers don't have to declare and pass a dummy variable.
>
> Changes since 20210302:
> * Fix definition of CONFIG_MIGRATION=n stub migrate_pages(). Its
> parameters were wrong, but oddly enough did not generate any
> compile errors.
>
> Changes since 20200122:
> * Fix migrate_pages() to manipulate nr_succeeded *value*
> rather than the pointer.
> ---
> include/linux/migrate.h | 5 +++--
> mm/compaction.c | 2 +-
> mm/gup.c | 2 +-
> mm/memory-failure.c | 2 +-
> mm/memory_hotplug.c | 2 +-
> mm/mempolicy.c | 4 ++--
> mm/migrate.c | 11 ++++++++---
> mm/page_alloc.c | 2 +-
> 8 files changed, 18 insertions(+), 12 deletions(-)
>
LGTM. Reviewed-by: Zi Yan <ziy@nvidia.com>


Best Regards,
Yan, Zi
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-07-15 20:03    [W:0.111 / U:1.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site