From mboxrd@z Thu Jan 1 00:00:00 1970 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 AAD1FC43334 for ; Mon, 6 Jun 2022 20:48:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2F0A26B0081; Mon, 6 Jun 2022 16:48:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 29F8B6B0082; Mon, 6 Jun 2022 16:48:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 168E76B0083; Mon, 6 Jun 2022 16:48:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 04C7D6B0081 for ; Mon, 6 Jun 2022 16:48:16 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id C7263609BC for ; Mon, 6 Jun 2022 20:48:15 +0000 (UTC) X-FDA: 79548998550.11.8782EC9 Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by imf26.hostedemail.com (Postfix) with ESMTP id 905C5140041 for ; Mon, 6 Jun 2022 20:48:10 +0000 (UTC) Received: by mail-pj1-f43.google.com with SMTP id d12-20020a17090abf8c00b001e2eb431ce4so13578673pjs.1 for ; Mon, 06 Jun 2022 13:48:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=AlPPNyvR7lWFI2X/TgyXlnC9vx00TL5Vm+xNvpSSNoA=; b=onq/TWloM+5cXdpjwh/6inxOthaxTkEiG/j5wDpdk6g/TQkcp9a0A+cafRzZH35+AM ZM78epWv+TGXUvh1aF99og/sdEOHYj9PPDmcP6q+Sk3A/vtzuJ9yJfhssR6P7u1CpRLp cUMJsu8Kp0AoqeSUW1gKx0cD5FcaEVuyLAm6U2EV5DuEcbJkMPMIzCpDBo0/uw2TqMlB NkFVawwE6H/O7ifHQ4ahzFWZIubIh2RrBNturvuIQ/95QzXagP5JXv3trzWsVWnGBsPi AlrkyUFxg8++9C9cXcLpL4GS5GodMQGQeODET7T6YwVNABW4h9qluL7f9ni/DSuPrJzq uO+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=AlPPNyvR7lWFI2X/TgyXlnC9vx00TL5Vm+xNvpSSNoA=; b=cIL7m7LxEtED+1i1NvsvEbVjerGJ5A/qPia05P9ulgNGrmOgGVOC+wV/3eBuPakJut NxRyj46yKcPbvEaqNP+QkcnyuHhZO3V9tOGPpnEQJRpGLQxjh3FEY5qSct1cLpghxDV2 /dLA6RtrI6hGjNkD12iTwNTe/DFrvMUq+272qXK5PWfJe3IG3D1RB5IrfeQHBPzawKR2 mlhSSnv16qGyuABRbjeuQAVeP1ZQ2IjrK6CSsFM1lf5wv6skvY/tJY1mDfX/UmnAON+k bIV9YYlt0ufzmQcySicB05TiyajiY3z53qR9YwGR2mjGpRaq+kXXTPVx4cinfYtEx87X r7CQ== X-Gm-Message-State: AOAM530VHNo1H4kJrmT6actkE54tPGuYLCJW7vEn0RVX1VMP5TL7StI5 2ytMt1yGSr3euAYAso8GARaK84M2ZBg= X-Google-Smtp-Source: ABdhPJxgji6mfqhBbxL3JBchT6aASnEZ9yodH/o/YTvmACsIhcerFsRvM1Xm+fzxjamxFo0x3EBZ+w== X-Received: by 2002:a17:90b:1b05:b0:1e2:a053:2fad with SMTP id nu5-20020a17090b1b0500b001e2a0532fadmr52776954pjb.209.1654548494401; Mon, 06 Jun 2022 13:48:14 -0700 (PDT) Received: from google.com ([2620:15c:211:201:e75e:2c04:7854:d454]) by smtp.gmail.com with ESMTPSA id q3-20020a056a0002a300b0051be16492basm7119485pfs.195.2022.06.06.13.48.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 13:48:14 -0700 (PDT) Date: Mon, 6 Jun 2022 13:48:12 -0700 From: Minchan Kim To: Andrew Morton Cc: Jaewon Kim , ngupta@vflare.org, senozhatsky@chromium.org, avromanov@sberdevices.ru, linux-mm@kvack.org, linux-kernel@vger.kernel.org, s.suk@samsung.com, ytk.lee@samsung.com, jaewon31.kim@gmail.com Subject: Re: [PATCH] zram_drv: add __GFP_NOMEMALLOC not to use ALLOC_NO_WATERMARKS Message-ID: References: <20220603055747.11694-1-jaewon31.kim@samsung.com> <20220606125939.ae37867e43b8b8b07fa06ca7@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220606125939.ae37867e43b8b8b07fa06ca7@linux-foundation.org> X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 905C5140041 X-Stat-Signature: 41xbuxt31p191cwagbkzn1q69k9kzbm8 X-Rspam-User: Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="onq/TWlo"; spf=pass (imf26.hostedemail.com: domain of minchan.kim@gmail.com designates 209.85.216.43 as permitted sender) smtp.mailfrom=minchan.kim@gmail.com; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none) X-HE-Tag: 1654548490-179109 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: On Mon, Jun 06, 2022 at 12:59:39PM -0700, Andrew Morton wrote: > On Mon, 6 Jun 2022 12:46:38 -0700 Minchan Kim wrote: > > > On Fri, Jun 03, 2022 at 02:57:47PM +0900, Jaewon Kim wrote: > > > The atomic page allocation failure sometimes happened, and most of them > > > seem to occur during boot time. > > > > > > <4>[ 59.707645] system_server: page allocation failure: order:0, mode:0xa20(GFP_ATOMIC), nodemask=(null),cpuset=foreground-boost,mems_allowed=0 > > > > ... > > > > > > > > The kswapd or other reclaim contexts may not prepare enough free pages > > > for too many atomic allocations occurred in short time. But zram may not > > > be helpful for this atomic allocation even though zram is used to > > > reclaim. > > > > > > To get one zs object for a specific size, zram may allocate serveral > > > pages. And this can be happened on different class sizes at the same > > > time. It means zram may consume more pages to reclaim only one page. > > > This inefficiency may consume all free pages below watmerk min by a > > > process having PF_MEMALLOC like kswapd. > > > > However, that's how zram has worked for a long time(allocate memory > > under memory pressure) and many folks already have raised min_free_kbytes > > when they use zram as swap. If we don't allow the allocation, swap out > > fails easier than old, which would break existing tunes. > > So is there a better way of preventing this warning? Just suppress it > with __GFP_NOWARN? For me, I usually tries to remove GFP_ATOMIC alllocation since the atomic allocation can be failed easily(zram is not only source for it). Otherwise, increase min_free_kbytes?