From patchwork Mon Sep 6 05:29:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaewon Kim X-Patchwork-Id: 12476299 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D14A1C433EF for ; Mon, 6 Sep 2021 05:28:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 610B460F6E for ; Mon, 6 Sep 2021 05:28:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 610B460F6E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=samsung.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 9F82B6B0071; Mon, 6 Sep 2021 01:28:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9A7D86B0072; Mon, 6 Sep 2021 01:28:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 86F216B0073; Mon, 6 Sep 2021 01:28:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0061.hostedemail.com [216.40.44.61]) by kanga.kvack.org (Postfix) with ESMTP id 747666B0071 for ; Mon, 6 Sep 2021 01:28:55 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 28576180ACF6C for ; Mon, 6 Sep 2021 05:28:55 +0000 (UTC) X-FDA: 78556019430.18.73502DB Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by imf18.hostedemail.com (Postfix) with ESMTP id BCBD34002085 for ; Mon, 6 Sep 2021 05:28:53 +0000 (UTC) Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20210906052850epoutp02427528b8a4ccd38c7328b7a9c6986af9~iJHwcCrOC2183621836epoutp02o for ; Mon, 6 Sep 2021 05:28:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20210906052850epoutp02427528b8a4ccd38c7328b7a9c6986af9~iJHwcCrOC2183621836epoutp02o DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1630906130; bh=D1wTegPjbU7mKHWfbuO1/C5CIjKOS5X8nr9yieL2Z/w=; h=From:To:Cc:Subject:Date:References:From; b=g3Vc9g6wXEfwMq2+44pja7AP4E3HWEjx4Mz++7aXMCUV+cCaNlYTmk3MDk/CuE50s zUVECB1cxjtkQjJ4XPhOWhLPlFPNIhBc2m423LS7KnxUFWbKO1ndQuFxm0Sw/BoGs/ LzUYjByXTrM87P3Q/G7qQ3nRAxPwCqSDZ+pV/NC8= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20210906052850epcas1p20f5afc3467058d8ae474fc73de85651b~iJHwEu0jD1356213562epcas1p2z; Mon, 6 Sep 2021 05:28:50 +0000 (GMT) Received: from epsmges1p1.samsung.com (unknown [182.195.38.250]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4H2xlM4wmQz4x9QN; Mon, 6 Sep 2021 05:28:47 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id 70.FD.09910.F07A5316; Mon, 6 Sep 2021 14:28:47 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p1.samsung.com (KnoxPortal) with ESMTPA id 20210906052847epcas1p1f53f1ad04ad785d53f64eef150969c34~iJHtV_x-00442304423epcas1p1g; Mon, 6 Sep 2021 05:28:47 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210906052847epsmtrp17c3f0d87cc230c17c7f062556db23fe4~iJHtVMqeJ0795807958epsmtrp1W; Mon, 6 Sep 2021 05:28:47 +0000 (GMT) X-AuditID: b6c32a35-1c13ba80000026b6-68-6135a70fa485 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 1B.8D.08750.F07A5316; Mon, 6 Sep 2021 14:28:47 +0900 (KST) Received: from jaewon-linux.10.32.193.11 (unknown [10.253.100.104]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20210906052846epsmtip1661e666b58c56aba4833cb1e1958c120~iJHtHPkVB2097020970epsmtip1B; Mon, 6 Sep 2021 05:28:46 +0000 (GMT) From: Jaewon Kim To: minchan@kernel.org, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, ytk.lee@samsung.com, jaewon31.kim@gmail.com, Jaewon Kim Subject: [PATCH] zram_drv: allow reclaim on bio_alloc Date: Mon, 6 Sep 2021 14:29:26 +0900 Message-Id: <20210906052926.6007-1-jaewon31.kim@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrCKsWRmVeSWpSXmKPExsWy7bCmri7/ctNEg0OztS3mrF/DZtG9eSaj Re/7V0wWl3fNYbO4t+Y/q8Wyr+/ZLR6v53Zg99g56y67x6ZVnWwemz5NYvc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BpqMRcVJwIAjxD8 cOcDAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpkluLIzCtJLcpLzFFi42LZdlhJTpd/uWmiwaEPbBZz1q9hs+jePJPR ovf9KyaLy7vmsFncW/Of1WLZ1/fsFo/Xczuwe+ycdZfdY9OqTjaPTZ8msXucmPGbxaNvyypG j8+b5ALYorhsUlJzMstSi/TtErgylrcdZSy4xVZx8UQjUwPjBdYuRk4OCQETiUVXdoLZQgI7 GCVeXGCEiMtIvDn/lKWLkQPIFpY4fLgYouQbo8SP1XEgNpuAtsT7BZPAWkUEjCW6Xl5n6mLk 4mAWmMAosXLZJxaQhLCAqcSVt21gM1kEVCWmTZnNDGLzCthI/H/+gAlil7zE6g0HmCcw8ixg ZFjFKJlaUJybnltsWGCUl1quV5yYW1yal66XnJ+7iREcSlpaOxj3rPqgd4iRiYPxEKMEB7OS CG+0s1GiEG9KYmVValF+fFFpTmrxIUZpDhYlcd4LXSfjhQTSE0tSs1NTC1KLYLJMHJxSDUx2 /MzWP4U9My7a+bWb/9lTf0/7U1e53WlOt+I/gtbes+Y09m6c+jFx45SOVqHzbxW/2v6f0L/n SeYBj0mRjXfS/0+2+nrSOLJ478P133WfasiH8XgW8FYYv1UTVeSpkq/aa2NV9kP+l++7nWGi S1ImfZ6XWsGkcO7yY5nnX2NrJJJDhW5Ondj1Y7ZjiGo5X13OKdlspsVCjFmdx/zlbzx/eNiw 6WzG8cbtAvwsUlr3YnZ2N4fs+iCTxdjO8GtxWEJwef9GnTT1ojU9G4pW3BdxF1mQNS2j6hDf l5NnBW3fhSp758c0F0i/3JRzf/PJb3Py4v2Yr+xw38f6ZFdBW36a1/Ywlhlf2NYnLz0cpMRS nJFoqMVcVJwIAJa9TMKUAgAA X-CMS-MailID: 20210906052847epcas1p1f53f1ad04ad785d53f64eef150969c34 X-Msg-Generator: CA X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210906052847epcas1p1f53f1ad04ad785d53f64eef150969c34 References: Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=samsung.com header.s=mail20170921 header.b=g3Vc9g6w; dmarc=pass (policy=none) header.from=samsung.com; spf=pass (imf18.hostedemail.com: domain of jaewon31.kim@samsung.com designates 203.254.224.25 as permitted sender) smtp.mailfrom=jaewon31.kim@samsung.com X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: BCBD34002085 X-Stat-Signature: sdt4rhujgsfsm73fy84su6w6qrdhez31 X-HE-Tag: 1630906133-249715 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 Acked-by: Minchan 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); if (!bio) return -ENOMEM;