Received: by 2002:a05:6512:2355:0:0:0:0 with SMTP id p21csp215008lfu; Wed, 30 Mar 2022 21:20:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLlfIpg0Q8e3yeIK/y/kLKzXBcC8jQzpGis+WcG6N7EwoSEoB3gZupKjdzEMKYF5usOi81 X-Received: by 2002:a63:f452:0:b0:382:7af1:6ad6 with SMTP id p18-20020a63f452000000b003827af16ad6mr8982398pgk.500.1648700452620; Wed, 30 Mar 2022 21:20:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648700452; cv=none; d=google.com; s=arc-20160816; b=oivYV5rsBoeOaHNl+pN3lAqg/ady+rlMvXGyNHMLK9/gAP94PIoMDr3Q+lvCqgHSCZ 6dFZE9Tx04aL/a7ykJQK9BWklkizmzRc6KqhcNKRWpQUJ6dn5xOkLl9RY6SC31YMgSfq 9VF1TIQ0cnH1HigGhdbram1WL3PxShIBpo0gC7E5Op+27+iWqibdyhzchQEe/WRvUeQv zytt05JGB/loil6l1Z0DnW1i4/jgR+xCajAtJ3uGFmdb6hoMRgGp0fMkXFpk+LQWpKxT 9FhVdeA9zzE0q2arXBGXLyr+TBrpAHzxxceVbCkghXmdNXv3JOJAB85a8dj32rQqnZqC SWcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=iHEjOeawVE4TGGyzTMRHiW0bGnAT2V/UGHXTsEjK33c=; b=Nls24Sc+tWGkVLvwiGD3519dunI04iwBk+vu8xqV3RoePjRQunbnhitIP0/yg1kOBa cdj9tSSZr6k/p86/rWxiyFKJO/uacXcYclcYHlYoN3MJI/dRzvmWpJr9205vIFFUhG8N bWbQhGtIc2HBxGiV/qbZRveoONk694NzVXU3NXvhn2Z4iuLkcX66I80OouUJhWX0orN8 2hAzrGeogsvY+C0yuRG84R/RZj/SkcFzX+hCQfplKggsNhwhL5CVEFC/AHGkwXHaNEQn 6gesad3q0bqZkWDaWaUeVGA6P0/FK4qcFeGPdrSaKu44bTMfmuhdm1u+IUDvL8yA0PVD aKtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=BAquZY3Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id u16-20020a170902e5d000b00153f6255da2si24074317plf.227.2022.03.30.21.20.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 21:20:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=BAquZY3Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2F248199E1C; Wed, 30 Mar 2022 20:16:35 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244662AbiC3JNq (ORCPT + 99 others); Wed, 30 Mar 2022 05:13:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244656AbiC3JNn (ORCPT ); Wed, 30 Mar 2022 05:13:43 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B778F221B83 for ; Wed, 30 Mar 2022 02:11:58 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id bh17so683196ejb.8 for ; Wed, 30 Mar 2022 02:11:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=iHEjOeawVE4TGGyzTMRHiW0bGnAT2V/UGHXTsEjK33c=; b=BAquZY3ZcJjJbGzdnLDnwoPAfCF3aPDs9DaAype0z44smc9sVNP1FgWzkid0jvZ3Vj UvZWNFM2xk4UP4B52AOmycyyuQrqVZ6j9nXJFevQ6rcpEU0Hx5SDi9tKaIrdcUAl6Bvc JRlRSLrtam3JCljIXAmoKkiDddKYchCtttn8z1X0tXtwC/jnmVLAU1Sha+qWRvHFp7aO Ch43V6BVwrYt5S7ri2LtZpKLoluilwbAD5N7Abfo8fm9aC++ql6ASD60Fb5l7lalJFNf A+FAqlvxbRHFMTrpZztQ/M1bnq4u4S7hGU8teieRi2Mdq3AJ7NfaY7VtuiobV/umUGmk rmLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=iHEjOeawVE4TGGyzTMRHiW0bGnAT2V/UGHXTsEjK33c=; b=plCKA6OB+jvA2xjvUWQ5HUVAn9c0q4Iz3Ei84jlrMPG1Nd/ZuUxgkFhldEAqwCI93P NB+onVnM9RQbZ5YWIBGn1SHPI2d3Eigtm7v4SeVsaPuy+7dDYzEIFmf2fSmJNAKvGqw2 p2Se1IMEF9HZkTx3aH60WWqBZ3vB/37P21kUox6T6hMIOPZC//bferHyCmFUYX3BT78P nm7IvzavgdToYO8q7NGpPsMl8e5NTsGqg1jxf+addWLV/HKzjyhDh5K/F0Z/9TN3/1ZE tvCApeIaA8uu6ql1yFvbpR8Oq9FEPbt2lgCyKu4exzGuhwZtgpeKAfp4typM58ciKuYe E/rg== X-Gm-Message-State: AOAM533D6/2f/5AvanrA7JSwZeGMoPULqa4nnj5nH7QMdnk1edMybWpJ mhw7mxmSAH/yh4AWOePhpHNqAtUe9UHO3SFH1HU= X-Received: by 2002:a17:907:1b08:b0:6da:b62a:762a with SMTP id mp8-20020a1709071b0800b006dab62a762amr37926168ejc.60.1648631517183; Wed, 30 Mar 2022 02:11:57 -0700 (PDT) MIME-Version: 1.0 References: <20220330052502.26072-1-jaewon31.kim@samsung.com> In-Reply-To: From: Jaewon Kim Date: Wed, 30 Mar 2022 18:11:46 +0900 Message-ID: Subject: Re: [PATCH] zram_drv: add __GFP_NOWARN flag on call to zs_malloc To: Michal Hocko Cc: Jaewon Kim , minchan@kernel.org, ngupta@vflare.org, senozhatsky@chromium.org, Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, s.suk@samsung.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2022=EB=85=84 3=EC=9B=94 30=EC=9D=BC (=EC=88=98) =EC=98=A4=ED=9B=84 5:49, M= ichal Hocko =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > > On Wed 30-03-22 10:06:18, Michal Hocko wrote: > > On Wed 30-03-22 14:25:02, Jaewon Kim wrote: > > > The page allocation with GFP_NOIO may fail. And zram can handle this > > > allocation failure. We do not need to print log for this. > > > > GFP_NOIO doesn't have any special meaning wrt to failures. zram > > allocates from the memory reclaim context which is a bad design IMHO. > > Btw. I forgot to mention that GFP_NOIO doesn't have any different > meaning than GFP_KERNEL from this (PF_MEMALLOC) allocation context > because this request will never perform a reclaim. Thank you for reply Yes it was kswapd with PF_MEMALLOC, but I thought this zs_malloc could fail on direct reclaim context. I think zram is gracefully handling this ENOMEM situation, it actually accounts the failed count as zram stats. The failed page will be tried to swap out again later. Yes I need to look into more about this memory shortage. But I thought there were too many ALLOC_HADER requests in a short time, and I want to see other allocation failure logs like one with GFP_ATOMIC instead of this zs_malloc failure log. > -- > Michal Hocko > SUSE Labs