Received: by 10.192.165.156 with SMTP id m28csp758324imm; Tue, 17 Apr 2018 20:10:36 -0700 (PDT) X-Google-Smtp-Source: AIpwx48RQ1St8fqKjDQdWhzrPk7Yf90KfilUvhJJvD8bR6tRBlfTMNL/9r883T0UjyOD50+0NKfG X-Received: by 2002:a17:902:b604:: with SMTP id b4-v6mr372595pls.109.1524021036340; Tue, 17 Apr 2018 20:10:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524021036; cv=none; d=google.com; s=arc-20160816; b=bTRqQTLQFi3ttwGxe/gnoPmDzky5Ky6fNvfrdT8zmZhqMt0MUKH+2pPn3r4OCd3yiq w//FOjdSoTZlIsetxoAL+8tE0wgtQRXBNqGmAkX+qwR+30Y5Ic7rGIJdxUA7cUEYFmpt 0p+vteGpWcwKbWw33D2V+etkFAhNuMnQDwq4c+EIkm4LNMR/d3W71CaycguYRIoDg5Kp 3BFWohkMR/V08q4uoC9FkLy1S8vCvNPqSvTR3sVJcEFsKh3wQPlwWDNU/NhyFZ9dTXLj bmb9UiJ96ltCNvp1JuOHKXnYFCXTRlyjS6uep98WLrWFlZVUuQlTNlViGFT0oXzAVPGq PUSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=PXg4KKhxeNMpmObpOFStzRGIFoNPXn+DPhQPWo/PWHE=; b=sYRXSbn/gTiZOFRitgoBqEQVw5X/EKRCIvmfweRbxvY3G2M/zdQLAibyekVIpCfqjC /2HtAdhsD6kHc/ql1K/Bpcp6Dr7fig/zH2t6d8VZpcjTMNloL36OyM4Z5IXI1BTQAbxv Sz+2rfTghIBPXDYDzQTD7YEbGxd09XYHt07hF8xWyUBkIgugPHHNfVTtF6F8IcBJQfaI R38Bc5/FCwrfNZVRO8QIZ+mb3jfQ6yyeUOkDbzqGtwS+En4GzUb+9gJGkpUPgiQ7y6N2 x39LUlbOR1bboQoHJ9hyXyWSouPfSh2ee1XuJNfyszm22GHrn+pWBjRUj0pyiTYcVmt0 yJsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=nfHzFH00; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o4si257839pgd.125.2018.04.17.20.10.11; Tue, 17 Apr 2018 20:10:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=nfHzFH00; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753353AbeDRDI1 (ORCPT + 99 others); Tue, 17 Apr 2018 23:08:27 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:52762 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753144AbeDRDI0 (ORCPT ); Tue, 17 Apr 2018 23:08:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=PXg4KKhxeNMpmObpOFStzRGIFoNPXn+DPhQPWo/PWHE=; b=nfHzFH00RzP8WgVKt39vqmjQM 4AIWX3On+BCo+/cwdSrHjtBVQPjCBInUzPYyxPb8b8OxgPRUYVuoFpiqRoVADokM2spL3A+pEMaJe dUKKBKyrQzS1bFJn7MGCvQmG+nmN/7h9FAMPMNU/U+7vKhKkMwRHouEKrmYdjWHo4F365gRAQf4Xi XlHklg9GGtfvsBemehTSYC3/zlCVWbmbgCLelEjvT0fdACUWBs0cEiQoqenxneJsIh9oym6GB09W7 kZ8SRVNxgqnilFsolma276xGpsoTJm1LV9ZvKd3KYt1tSiH8lqemLLDpYxZCZTif3CLRTpkXUp0Ao YYh+xzeRw==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1f8dSK-00062P-Hm; Wed, 18 Apr 2018 03:08:24 +0000 Date: Tue, 17 Apr 2018 20:08:24 -0700 From: Matthew Wilcox To: Minchan Kim Cc: Andrew Morton , LKML , linux-mm , Johannes Weiner , Michal Hocko , Vladimir Davydov Subject: Re: [PATCH] mm:memcg: add __GFP_NOWARN in __memcg_schedule_kmem_cache_create Message-ID: <20180418030824.GA7320@bombadil.infradead.org> References: <20180418022912.248417-1-minchan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180418022912.248417-1-minchan@kernel.org> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 18, 2018 at 11:29:12AM +0900, Minchan Kim wrote: > If there are heavy memory pressure, page allocation with __GFP_NOWAIT > fails easily although it's order-0 request. > I got below warning 9 times for normal boot. > > [ 17.072747] c0 0 : page allocation failure: order:0, mode:0x2200000(GFP_NOWAIT|__GFP_NOTRACK) > > Let's not make user scared. > > - cw = kmalloc(sizeof(*cw), GFP_NOWAIT); > + cw = kmalloc(sizeof(*cw), GFP_NOWAIT | __GFP_NOWARN); > if (!cw) Not arguing against this patch. But how many places do we want to use GFP_NOWAIT without __GFP_NOWARN? Not many, and the few which do do this seem like they simply haven't added it yet. Maybe this would be a good idea? -#define GFP_NOWAIT (__GFP_KSWAPD_RECLAIM) +#define GFP_NOWAIT (__GFP_KSWAPD_RECLAIM | __GFP_NOWARN)