Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp2642739pxb; Mon, 6 Sep 2021 01:52:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHBQgkDNCwJ6NKb5xIexEVqWeHzudk9bYHFtS/griKxheqsXxc1Ij5kBj0enWd0u8fd2Xx X-Received: by 2002:a6b:7106:: with SMTP id q6mr9265470iog.174.1630918330386; Mon, 06 Sep 2021 01:52:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630918330; cv=none; d=google.com; s=arc-20160816; b=hrbESFOkM6rJ+wI79rkw69efZzgbQBgmZS7yQpD1iOvW7eu9puInV6vBLl1SQD+Cn8 gJ0IK5EXnI6C/JvsMLs2XrDCFVnj0zI9JK1QphSR6vH47U01FZPFLsapGJACWEsNBpRG 4G7GdUXpt+BI+R5WPw+VZUKgP86XcLgeNhjk5sgbHCFEtGcDABS2ozOyX7t3/hIUyV7E N811t1gcvQ9NLzPT3QeStojpc/gFYzjWQoaGcU9UVmxErjgX715n0w2ioZOxqe3LjMas 7/8QG1Jg8k5dbqgo1SHMZ/3ouKUmF97lCMo4iGIHkTe+RjTyi+xLKmzYOXmngvygbvv6 0nBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xT814fvWWw70J/M6nc8pISxm2/K29BOxkkAtfEmol6A=; b=WuOwyJSVQlewjvaauLnPNQv1EyCeqCi6VeZt1kApZBH0IPhyRjoDPGTHe5YrupW/C5 EoCbaXbn7W0+fg4ZCkgGA/EShes8Mc2QjQ7czTKOfv8NMyZz4wGOnyI9TmLfV+2Li9xf vqy5wStt1iCfSAYp0jOEYFue/ttc+1wTQP5g1e8y8Wk3Q1jKyxHzZ91NP8U3lXgvDV8W 6SAvBKEiKFR67r6QIX/I9sg8gppQX/qFJ7x4m5J1h4C5sC5uRciV4qq81ogLk1lBh211 cWUVMsQXG36+MHnXRT4LAbU86KzSX3FzdB2pmNOpuHmdF+on/YcMhBy2HJ+3sOKMoFa8 UX4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=aWOWFIKo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 186si6958056jaf.38.2021.09.06.01.51.58; Mon, 06 Sep 2021 01:52:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=aWOWFIKo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241097AbhIFIl0 (ORCPT + 99 others); Mon, 6 Sep 2021 04:41:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230161AbhIFIlZ (ORCPT ); Mon, 6 Sep 2021 04:41:25 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBF96C061575 for ; Mon, 6 Sep 2021 01:40:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=xT814fvWWw70J/M6nc8pISxm2/K29BOxkkAtfEmol6A=; b=aWOWFIKoKbEgpB/11WlRhs7NYQ FgHMpo+La1rd1IhbdPsSy/ThFnQ/LzZgp4+2DE4dokxiyX1VEEPq/LrmKsaZ371Kj8LKQCt1j9Fkb tFN323ZT8xcO+nUSRCzetUgtXrwKhZ6AzYoGAdCtBbR5GiGQUFqF10FEKEjQh7wlD1XfXwxCPZfHH u1wPRd4/b/LEMImjLvUaPxq8i9T1FFpiXan04sT/OA3eq4vUHNsT0ANcgfA9cD/Y7oNQWl6OF9BA4 HQg4qk+Honk7uK2k/Ob2CC0ljaEka/p30fhfFY9nTz/EPS3X9dKD889DVyJVGhL0iSEsVaYAsfRXT 23jHhYQQ==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mNA8x-006mhR-5b; Mon, 06 Sep 2021 08:38:57 +0000 Date: Mon, 6 Sep 2021 09:38:19 +0100 From: Christoph Hellwig To: Jaewon Kim Cc: minchan@kernel.org, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, ytk.lee@samsung.com, jaewon31.kim@gmail.com Subject: Re: [PATCH] zram_drv: allow reclaim on bio_alloc Message-ID: References: <20210906052926.6007-1-jaewon31.kim@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210906052926.6007-1-jaewon31.kim@samsung.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Signed-off-by: Jaewon Kim > --- > 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.