From: Jaewon Kim <jaewon31.kim@samsung.com>
To: minchan@kernel.org, ngupta@vflare.org, senozhatsky@chromium.org,
akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
s.suk@samsung.com, jaewon31.kim@gmail.com,
Jaewon Kim <jaewon31.kim@samsung.com>
Subject: [PATCH] zram_drv: add __GFP_NOWARN flag on call to zs_malloc
Date: Wed, 30 Mar 2022 14:25:02 +0900 [thread overview]
Message-ID: <20220330052502.26072-1-jaewon31.kim@samsung.com> (raw)
In-Reply-To: <CGME20220330052214epcas1p250cff6b3168a1c9c253e1fe70e68ca8b@epcas1p2.samsung.com>
The page allocation with GFP_NOIO may fail. And zram can handle this
allocation failure. We do not need to print log for this.
Actually warn_alloc was more restricted by commit 1be334e5c088
("mm/page_alloc.c: ratelimit allocation failure warnings more
aggressively"). To catch other allocation failure, zram can use
__GFP_NOWARN.
This is what I got.
kswapd0: page allocation failure: order:0, mode:0x140000a(GFP_NOIO|__GFP_HIGHMEM|__GFP_MOVABLE), nodemask=(null)
kswapd0 cpuset=/ mems_allowed=0
Call trace:
dump_backtrace+0x0/0x218
show_stack+0x14/0x1c
dump_stack+0xb8/0xf0
warn_alloc+0x110/0x234
__alloc_pages_nodemask+0x11c0/0x12a0
zs_malloc+0x1ac/0x50c
zram_bvec_rw+0x1a4/0x6a8
zram_make_request+0x23c/0x328
generic_make_request+0xe4/0x270
submit_bio+0x64/0x2a8
__swap_writepage+0x3a8/0x404
swap_writepage+0x40/0x4c
shrink_page_list.llvm.15153564514306699876+0xffc/0x13a0
shrink_inactive_list+0x2dc/0x710
shrink_node_memcg+0x394/0x940
shrink_node+0x194/0x380
Signed-off-by: Jaewon Kim <jaewon31.kim@samsung.com>
---
drivers/block/zram/zram_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index e9474b02012d..c22201da25bb 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -1405,6 +1405,7 @@ static int __zram_bvec_write(struct zram *zram, struct bio_vec *bvec,
atomic64_inc(&zram->stats.writestall);
handle = zs_malloc(zram->mem_pool, comp_len,
GFP_NOIO | __GFP_HIGHMEM |
+ __GFP_NOWARN |
__GFP_MOVABLE);
if (handle)
goto compress_again;
--
2.17.1
next parent reply other threads:[~2022-03-30 5:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20220330052214epcas1p250cff6b3168a1c9c253e1fe70e68ca8b@epcas1p2.samsung.com>
2022-03-30 5:25 ` Jaewon Kim [this message]
2022-03-30 8:06 ` Michal Hocko
2022-03-30 8:41 ` Sergey Senozhatsky
2022-03-30 8:49 ` Michal Hocko
2022-03-30 9:11 ` Jaewon Kim
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=20220330052502.26072-1-jaewon31.kim@samsung.com \
--to=jaewon31.kim@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=jaewon31.kim@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.org \
--cc=s.suk@samsung.com \
--cc=senozhatsky@chromium.org \
/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