No description
Find a file
Yang Shi 0730292ca8 mm: move_pages: report the number of non-attempted pages
commit 5984fabb6e upstream.

Since commit a49bd4d716 ("mm, numa: rework do_pages_move"), the
semantic of move_pages() has changed to return the number of
non-migrated pages if they were result of a non-fatal reasons (usually a
busy page).

This was an unintentional change that hasn't been noticed except for LTP
tests which checked for the documented behavior.

There are two ways to go around this change.  We can even get back to
the original behavior and return -EAGAIN whenever migrate_pages is not
able to migrate pages due to non-fatal reasons.  Another option would be
to simply continue with the changed semantic and extend move_pages
documentation to clarify that -errno is returned on an invalid input or
when migration simply cannot succeed (e.g.  -ENOMEM, -EBUSY) or the
number of pages that couldn't have been migrated due to ephemeral
reasons (e.g.  page is pinned or locked for other reasons).

This patch implements the second option because this behavior is in
place for some time without anybody complaining and possibly new users
depending on it.  Also it allows to have a slightly easier error
handling as the caller knows that it is worth to retry when err > 0.

But since the new semantic would be aborted immediately if migration is
failed due to ephemeral reasons, need include the number of
non-attempted pages in the return value too.

Link: http://lkml.kernel.org/r/1580160527-109104-1-git-send-email-yang.shi@linux.alibaba.com
Fixes: a49bd4d716 ("mm, numa: rework do_pages_move")
Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com>
Suggested-by: Michal Hocko <mhocko@suse.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: Wei Yang <richardw.yang@linux.intel.com>
Cc: <stable@vger.kernel.org>    [4.17+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-11 04:33:56 -08:00
arch sparc32: fix struct ipc64_perm type definition 2020-02-11 04:33:52 -08:00
block block: fix 32 bit overflow in __blkdev_issue_discard() 2020-02-01 09:37:12 +00:00
certs
crypto crypto: pcrypt - Fix user-after-free on module unload 2020-02-05 14:43:32 +00:00
Documentation PM / devfreq: Add new name attribute for sysfs 2020-02-05 14:43:34 +00:00
drivers usb: gadget: f_ecm: Use atomic_t to track in-flight request 2020-02-11 04:33:56 -08:00
firmware Fix built-in early-load Intel microcode alignment 2020-01-23 08:21:29 +01:00
fs udf: Allow writing to 'Rewritable' partitions 2020-02-11 04:33:51 -08:00
include cfg80211: Fix radar event during another phy CAC 2020-02-05 14:43:46 +00:00
init fork: fix some -Wmissing-prototypes warnings 2019-12-05 09:21:04 +01:00
ipc ipc/msg.c: consolidate all xxxctl_down() functions 2020-02-11 04:33:55 -08:00
kernel rcu: Avoid data-race in rcu_gp_fqs_check_wake() 2020-02-11 04:33:55 -08:00
lib Partially revert "kfifo: fix kfifo_alloc() and kfifo_init()" 2020-01-27 14:51:08 +01:00
LICENSES
mm mm: move_pages: report the number of non-attempted pages 2020-02-11 04:33:56 -08:00
net rxrpc: Fix NULL pointer deref due to call->conn being cleared on disconnect 2020-02-11 04:33:54 -08:00
samples samples/bpf: Fix broken xdp_rxq_info due to map order assumptions 2020-01-27 14:51:22 +01:00
scripts ARM: 8950/1: ftrace/recordmcount: filter relocation types 2020-01-29 16:43:19 +01:00
security tomoyo: Use atomic_t for statistics counter 2020-02-05 14:43:38 +00:00
sound ALSA: dummy: Fix PCM format loop in proc output 2020-02-11 04:33:56 -08:00
tools perf report: Fix no libunwind compiled warning break s390 issue 2020-02-05 14:43:54 +00:00
usr
virt KVM: arm/arm64: vgic: Don't rely on the wrong pending table 2019-12-13 08:52:45 +01:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile Linux 4.19.102 2020-02-05 14:43:55 +00:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.