]> git.ipfire.org Git - thirdparty/linux.git/commit - mm/page_io.c
mm/page_io: use pr_alert_ratelimited for swap read/write errors
authorGeorgi Djakov <georgi.djakov@linaro.org>
Wed, 24 Feb 2021 20:03:01 +0000 (12:03 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 24 Feb 2021 21:38:29 +0000 (13:38 -0800)
commit25eaab438dd58092c5f0c62118d933bf8b2fcc76
tree543837c32c051f5250b1beaccc1baa7b5555070c
parentcf532faa41c55ad39fcff211132c58b0acf35c62
mm/page_io: use pr_alert_ratelimited for swap read/write errors

If there are errors during swap read or write, they can easily fill the
log buffer and remove any previous messages that might be useful for
debugging, especially on systems that rely for logging only on the kernel
ring-buffer.

For example, on a systems using zram as swap, we are more likely to see
any page allocation errors preceding the swap write errors if the alerts
are ratelimited.

Link: https://lkml.kernel.org/r/20210201142055.29068-1-georgi.djakov@linaro.org
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Acked-by: Minchan Kim <minchan@kernel.org>
Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_io.c