From: Michal Hocko <mhocko@kernel.org>
To: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
Minchan Kim <minchan@kernel.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: ratelimit end_swap_bio_write() error
Date: Sat, 6 Jan 2018 10:41:24 +0100 [thread overview]
Message-ID: <20180106094124.GB16576@dhcp22.suse.cz> (raw)
In-Reply-To: <20180106043407.25193-1-sergey.senozhatsky@gmail.com>
On Sat 06-01-18 13:34:07, Sergey Senozhatsky wrote:
> Use the ratelimited printk() version for swap-device write error
> reporting. We can use ZRAM as a swap-device, and the tricky part
> here is that zsmalloc() stores compressed objects in memory, thus
> it has to allocates pages during swap-out. If the system is short
> on memory, then we begin to flood printk() log buffer with the
> same "Write-error on swap-device XXX" error messages and sometimes
> simply lockup the system.
Should we print an error in such a situation at all? Write-error
certainly sounds scare and it suggests something went really wrong.
My understading is that zram failed swap-out is not critical and
therefore the error message is not really useful. Or what should an
admin do when seeing it?
> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> ---
> mm/page_io.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/page_io.c b/mm/page_io.c
> index e93f1a4cacd7..422cd49bcba8 100644
> --- a/mm/page_io.c
> +++ b/mm/page_io.c
> @@ -63,7 +63,7 @@ void end_swap_bio_write(struct bio *bio)
> * Also clear PG_reclaim to avoid rotate_reclaimable_page()
> */
> set_page_dirty(page);
> - pr_alert("Write-error on swap-device (%u:%u:%llu)\n",
> + pr_alert_ratelimited("Write-error on swap-device (%u:%u:%llu)\n",
> MAJOR(bio_dev(bio)), MINOR(bio_dev(bio)),
> (unsigned long long)bio->bi_iter.bi_sector);
> ClearPageReclaim(page);
> --
> 2.15.1
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2018-01-06 9:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-06 4:34 [PATCH] mm: ratelimit end_swap_bio_write() error Sergey Senozhatsky
2018-01-06 9:41 ` Michal Hocko [this message]
2018-01-06 10:03 ` Sergey Senozhatsky
2018-01-06 13:34 ` Michal Hocko
2018-01-08 1:58 ` Sergey Senozhatsky
2018-01-08 8:37 ` Michal Hocko
2018-01-08 10:22 ` Sergey Senozhatsky
2018-01-12 4:41 ` Sergey Senozhatsky
2018-01-12 12:27 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180106094124.GB16576@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=sergey.senozhatsky@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).