aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Documentation/vm
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang@linux.alibaba.com>2022-01-14 14:08:34 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2022-01-15 16:30:30 +0200
commitb5bade978e9b8f42521ccef711642bd21313cf44 (patch)
tree981e256900b4a7fffb87464c2391eda4109d156c /Documentation/vm
parenthugetlbfs: fix off-by-one error in hugetlb_vmdelete_list() (diff)
downloadwireguard-linux-b5bade978e9b8f42521ccef711642bd21313cf44.tar.xz
wireguard-linux-b5bade978e9b8f42521ccef711642bd21313cf44.zip
mm: migrate: fix the return value of migrate_pages()
Patch series "Improve the migration stats". According to talk with Zi Yan [1], this patch set changes the return value of migrate_pages() to avoid returning a number which is larger than the number of pages the users tried to migrate by move_pages() syscall. Also fix the hugetlb migration stats and migration stats in trace_mm_compaction_migratepages(). [1] https://lore.kernel.org/linux-mm/7E44019D-2A5D-4BA7-B4D5-00D4712F1687@nvidia.com/ This patch (of 3): As Zi Yan pointed out, the syscall move_pages() can return a non-migrated number larger than the number of pages the users tried to migrate, when a THP page is failed to migrate. This is confusing for users. Since other migration scenarios do not care about the actual non-migrated number of pages except the memory compaction migration which will fix in following patch. Thus we can change the return value to return the number of {normal page, THP, hugetlb} instead to avoid this issue, and the number of THP splits will be considered as the number of non-migrated THP, no matter how many subpages of the THP are migrated successfully. Meanwhile we should still keep the migration counters using the number of normal pages. Link: https://lkml.kernel.org/r/cover.1636275127.git.baolin.wang@linux.alibaba.com Link: https://lkml.kernel.org/r/6486fabc3e8c66ff613e150af25e89b3147977a6.1636275127.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com> Signed-off-by: Zi Yan <ziy@nvidia.com> Co-developed-by: Zi Yan <ziy@nvidia.com> Cc: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/vm')
0 files changed, 0 insertions, 0 deletions