All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaewon Kim <jaewon31.kim@samsung.com>
To: Minchan Kim <minchan@kernel.org>, Jaewon Kim <jaewon31.kim@samsung.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	YongTaek Lee <ytk.lee@samsung.com>,
	"jaewon31.kim@gmail.com" <jaewon31.kim@gmail.com>
Subject: RE:(3) [PATCH] zram_drv: allow reclaim on bio_alloc
Date: Wed, 08 Sep 2021 09:41:46 +0900	[thread overview]
Message-ID: <20210908004146epcms1p295287978b225bbf1c85b1abcf29f8289@epcms1p2> (raw)
In-Reply-To: <YTeas6sPrvQKmUHG@google.com>

> 
> 
>--------- Original Message ---------
>Sender : Minchan Kim <minchan@kernel.org>
>Date : 2021-09-08 02:00 (GMT+9)
>Title : Re: (2) [PATCH] zram_drv: allow reclaim on bio_alloc
> 
>Hi Jaewon,
> 
>On Mon, Sep 06, 2021 at 06:14:48PM +0900, Jaewon Kim wrote:
>> > 
>> > 
>> >--------- Original Message ---------
>> >Sender : Christoph Hellwig <hch@infradead.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@samsung.com>
>> >> Signed-off-by: Jaewon Kim <jaewon31.kim@samsung.com>
> 
>Looks reasonable to me.
>Feel free to add after dealing with Christoph's comment.
> 
>Acked-by: Minchan Kim <minchan@kernel.org>
> 
>Thank you.

Thank you, I will send v2 patch soon.

> 
>> >> ---
>> >>  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
> 

      parent reply	other threads:[~2021-09-08  0:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210906052847epcas1p1f53f1ad04ad785d53f64eef150969c34@epcas1p1.samsung.com>
2021-09-06  5:29 ` [PATCH] zram_drv: allow reclaim on bio_alloc Jaewon Kim
2021-09-06  8:38   ` Christoph Hellwig
     [not found]   ` <CGME20210906052847epcas1p1f53f1ad04ad785d53f64eef150969c34@epcms1p6>
2021-09-06  9:14     ` Jaewon Kim
2021-09-07 17:00       ` (2) " Minchan Kim
     [not found]       ` <CGME20210906052847epcas1p1f53f1ad04ad785d53f64eef150969c34@epcms1p2>
2021-09-08  0:41         ` Jaewon Kim [this message]

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=20210908004146epcms1p295287978b225bbf1c85b1abcf29f8289@epcms1p2 \
    --to=jaewon31.kim@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=hch@infradead.org \
    --cc=jaewon31.kim@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=ytk.lee@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.