From patchwork Wed Mar 30 05:25:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaewon Kim X-Patchwork-Id: 12795465 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CF77C433EF for ; Wed, 30 Mar 2022 05:22:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 93F548D0002; Wed, 30 Mar 2022 01:22:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8C8B58D0001; Wed, 30 Mar 2022 01:22:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 71AE38D0002; Wed, 30 Mar 2022 01:22:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 5B51F8D0001 for ; Wed, 30 Mar 2022 01:22:23 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 1B26A24333 for ; Wed, 30 Mar 2022 05:22:23 +0000 (UTC) X-FDA: 79299906966.15.990A897 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by imf21.hostedemail.com (Postfix) with ESMTP id B04951C0004 for ; Wed, 30 Mar 2022 05:22:21 +0000 (UTC) Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20220330052218epoutp0239675fbd11d50794c78457200d22eb2f~hERkomjVH2858928589epoutp02c for ; Wed, 30 Mar 2022 05:22:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20220330052218epoutp0239675fbd11d50794c78457200d22eb2f~hERkomjVH2858928589epoutp02c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1648617738; bh=RDJmuqlXXYxm9LUmr11dkUGLyi8fQN1YQyefFjvtlEE=; h=From:To:Cc:Subject:Date:References:From; b=Y+Zz5S2X3PrpjT9vaM5RcBLwrFCiwyTvq9fWgHHQv9Q3NzP+aivGPyVljAgQwrn3l R883CW52HlnUrktzrGkdS0n9ezghPwe8u8KZY3wiR805fNrqkoMHHEZDndtlv0sq0p 8692FYrFvE5S4Z7k4FbNzSB7vfP6gM0vZ3DJArHA= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20220330052217epcas1p25791a4462e3e4e1cc49afd0e401ccbcc~hERkOF4M60062400624epcas1p2R; Wed, 30 Mar 2022 05:22:17 +0000 (GMT) Received: from epsmges1p1.samsung.com (unknown [182.195.38.240]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4KSvvD3hrlz4x9Pv; Wed, 30 Mar 2022 05:22:16 +0000 (GMT) Received: from epcas1p4.samsung.com ( [182.195.41.48]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id 65.B0.64085.609E3426; Wed, 30 Mar 2022 14:22:14 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p2.samsung.com (KnoxPortal) with ESMTPA id 20220330052214epcas1p250cff6b3168a1c9c253e1fe70e68ca8b~hERhO17-b0062400624epcas1p2F; Wed, 30 Mar 2022 05:22:14 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220330052214epsmtrp20694a2aaa812a50637d287736b0fe26d~hERhOE1JP2542825428epsmtrp2g; Wed, 30 Mar 2022 05:22:14 +0000 (GMT) X-AuditID: b6c32a35-9c3ff7000000fa55-ca-6243e906a730 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id BC.CF.24342.609E3426; Wed, 30 Mar 2022 14:22:14 +0900 (KST) Received: from jaewon-linux.10.32.193.11 (unknown [10.253.100.104]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220330052214epsmtip1463f93b07e7644d512d5ef513d004421~hERhFqgNI1499314993epsmtip1e; Wed, 30 Mar 2022 05:22:14 +0000 (GMT) From: Jaewon Kim To: minchan@kernel.org, ngupta@vflare.org, senozhatsky@chromium.org, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, s.suk@samsung.com, jaewon31.kim@gmail.com, Jaewon Kim Subject: [PATCH] zram_drv: add __GFP_NOWARN flag on call to zs_malloc Date: Wed, 30 Mar 2022 14:25:02 +0900 Message-Id: <20220330052502.26072-1-jaewon31.kim@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrBKsWRmVeSWpSXmKPExsWy7bCmgS7bS+ckg+YdFhZz1q9hs+jePJPR ovf9KyaLy7vmsFncW/Of1WLZ1/fsFhtaZrFbLPp7hd1i98ZFbA6cHrMbLrJ47Jx1l91j06pO No9Nnyaxe5yY8ZvFo2/LKkaPnZ82s3p83iQXwBGVbZORmpiSWqSQmpecn5KZl26r5B0c7xxv amZgqGtoaWGupJCXmJtqq+TiE6DrlpkDdJ+SQlliTilQKCCxuFhJ386mKL+0JFUhI7+4xFYp tSAlp8CsQK84Mbe4NC9dLy+1xMrQwMDIFKgwITtj9/s7jAVfeSouzXvI3sDYwd3FyMkhIWAi cXbuDbYuRi4OIYEdjBLX9j9kh3A+MUpM/tEKlfnGKPF7/QcmmJavzTNZIRJ7GSX+N/9ihnB+ MEp8WXmODaSKTUBb4v2CSawgtohAgsSBrRfAipgFOhglOl80gRUJC7hK/JlylhnEZhFQlbhx eAMjiM0rYCvx8+VcNoh18hKrNxwAa5YQuMUu8f7zQ1aIhIvE65932CFsYYlXx7dA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ufLuVC75CVWbzjAPIGRZwEjwypGydSC4tz03GLDAsO81HK94sTc4tK8dL3k /NxNjOCw09Lcwbh91Qe9Q4xMHIyHGCU4mJVEeD8edE4S4k1JrKxKLcqPLyrNSS0+xCjNwaIk znuh62S8kEB6YklqdmpqQWoRTJaJg1OqgenAzOkbUiYwT7nJ/uvmd21eGWYjQ/3Ci/s9TG82 XPW4aiw+Le3R2aYFGYazWPeJvq9kXip/d39Uzuznvz78+vaZberTbasijC7uZRK5dMHVs8zp zJ1dNtddHllVpy+YuTGWL+qec42ANRsX78UjHfc3c3bcta19vapwQo3ujsvGQuWecydvisiQ mKMQwTvRrUST8djhJYqPzqzY5v9O8nBSS1jIXH/m+wt23bIoFbbr/66UkTddYVnC9/VPTWb+ 7vfRqVPm0BFNeaxQdi88Q2C654knHXotxmvLgztE/GXXmv1a7Lv81Jll3S9/rI5huLly6cmt FkJbLdelZ1dGl5pKr4jSXxVYdjvT7I6Ro4gSS3FGoqEWc1FxIgCYU9ChqgIAAA== X-CMS-MailID: 20220330052214epcas1p250cff6b3168a1c9c253e1fe70e68ca8b X-Msg-Generator: CA X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220330052214epcas1p250cff6b3168a1c9c253e1fe70e68ca8b References: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: B04951C0004 X-Stat-Signature: 8qtmpw7pmsfeup36znyod4iy6kcyru4q Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=samsung.com header.s=mail20170921 header.b=Y+Zz5S2X; dmarc=pass (policy=none) header.from=samsung.com; spf=pass (imf21.hostedemail.com: domain of jaewon31.kim@samsung.com designates 203.254.224.25 as permitted sender) smtp.mailfrom=jaewon31.kim@samsung.com X-Rspam-User: X-HE-Tag: 1648617741-424519 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 page allocation with GFP_NOIO may fail. And zram can handle this allocation failure. We do not need to print log for this. Actually warn_alloc was more restricted by commit 1be334e5c088 ("mm/page_alloc.c: ratelimit allocation failure warnings more aggressively"). To catch other allocation failure, zram can use __GFP_NOWARN. This is what I got. kswapd0: page allocation failure: order:0, mode:0x140000a(GFP_NOIO|__GFP_HIGHMEM|__GFP_MOVABLE), nodemask=(null) kswapd0 cpuset=/ mems_allowed=0 Call trace: dump_backtrace+0x0/0x218 show_stack+0x14/0x1c dump_stack+0xb8/0xf0 warn_alloc+0x110/0x234 __alloc_pages_nodemask+0x11c0/0x12a0 zs_malloc+0x1ac/0x50c zram_bvec_rw+0x1a4/0x6a8 zram_make_request+0x23c/0x328 generic_make_request+0xe4/0x270 submit_bio+0x64/0x2a8 __swap_writepage+0x3a8/0x404 swap_writepage+0x40/0x4c shrink_page_list.llvm.15153564514306699876+0xffc/0x13a0 shrink_inactive_list+0x2dc/0x710 shrink_node_memcg+0x394/0x940 shrink_node+0x194/0x380 Signed-off-by: Jaewon Kim --- drivers/block/zram/zram_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index e9474b02012d..c22201da25bb 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -1405,6 +1405,7 @@ static int __zram_bvec_write(struct zram *zram, struct bio_vec *bvec, atomic64_inc(&zram->stats.writestall); handle = zs_malloc(zram->mem_pool, comp_len, GFP_NOIO | __GFP_HIGHMEM | + __GFP_NOWARN | __GFP_MOVABLE); if (handle) goto compress_again;