[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210906091448epcms1p6bcc1f11b0da18e215219e6868ed07914@epcms1p6>
Date: Mon, 06 Sep 2021 18:14:48 +0900
From: Jaewon Kim <jaewon31.kim@...sung.com>
To: Christoph Hellwig <hch@...radead.org>,
Jaewon Kim <jaewon31.kim@...sung.com>
CC: "minchan@...nel.org" <minchan@...nel.org>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
YongTaek Lee <ytk.lee@...sung.com>,
"jaewon31.kim@...il.com" <jaewon31.kim@...il.com>
Subject: RE:(2) [PATCH] zram_drv: allow reclaim on bio_alloc
>
>
>--------- Original Message ---------
>Sender : Christoph Hellwig <hch@...radead.org>
>Date : 2021-09-06 17:39 (GMT+9)
>Title : Re: [PATCH] zram_drv: allow reclaim on bio_alloc
>
>On Mon, Sep 06, 2021 at 02:29:26PM +0900, Jaewon Kim wrote:
>> 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@...sung.com>
>> Signed-off-by: Jaewon Kim <jaewon31.kim@...sung.com>
>> ---
>> 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..53be528a39a2 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|__GFP_HIGHMEM, 1);
>
>Passing __GFP_HIGHMEM to bio_alloc does not make any sense whatsoever.
>
Correct, let me remove __GFP_HIGHMEM if I send v2 patch.
Thank you
Powered by blists - more mailing lists