zram_drv: allow reclaim on bio_alloc
Subsystems (3)
A message that is not in the archive (sent off-list or not yet received): CGME20210908005211epcas1p49238a827ca0c829bb056ba57c995e750@epcas1p4.samsung.com
PATCH v2 1/1 zram_drv: allow reclaim on bio_alloc
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 <[email protected]>
Signed-off-by Jaewon Kim <[email protected]>
Acked-by Minchan Kim <[email protected]>
---
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(-)
drivers/block/zram/zram_drv.c +1 -1
@@ -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 ;
Signature · 1 line
2.17.1