* [PATCH v2] zram_drv: allow reclaim on bio_alloc
[not found] <CGME20210908005211epcas1p49238a827ca0c829bb056ba57c995e750@epcas1p4.samsung.com>
@ 2021-09-08 0:52 ` Jaewon Kim
0 siblings, 0 replies; only message in thread
From: Jaewon Kim @ 2021-09-08 0:52 UTC (permalink / raw)
To: minchan, hch, akpm
Cc: linux-mm, linux-kernel, ytk.lee, jaewon31.kim, Jaewon Kim
The read_from_bdev_async is not called on atomic context. So GFP_NOIO is
available rather than GFP_ATOMIC. If there were reclaimable pages with
GFP_NOIO, we can avoid allocation failure and page fault failure.
Reported-by: Yong-Taek Lee <ytk.lee@samsung.com>
Signed-off-by: Jaewon Kim <jaewon31.kim@samsung.com>
Acked-by: Minchan Kim <minchan@kernel.org>
---
v2: use GFP_NOIO only
v1: use GFP_NOIO | __GFP_HIGHMEM
---
drivers/block/zram/zram_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index fcaf2750f68f..081e77d595d7 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -587,7 +587,7 @@ static int read_from_bdev_async(struct zram *zram, struct bio_vec *bvec,
{
struct bio *bio;
- bio = bio_alloc(GFP_ATOMIC, 1);
+ bio = bio_alloc(GFP_NOIO, 1);
if (!bio)
return -ENOMEM;
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-08 0:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20210908005211epcas1p49238a827ca0c829bb056ba57c995e750@epcas1p4.samsung.com>
2021-09-08 0:52 ` [PATCH v2] zram_drv: allow reclaim on bio_alloc Jaewon Kim
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).