Received: by 10.213.65.68 with SMTP id h4csp2007119imn; Thu, 5 Apr 2018 07:29:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx49rIEDwcqfe3365ssyvCTALCkVzgE/2a7UAriNp/+IvR9ukPYLyZBzYD6mNPCLFTZbFwuYX X-Received: by 2002:a17:902:c24:: with SMTP id 33-v6mr23598049pls.88.1522938575302; Thu, 05 Apr 2018 07:29:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522938575; cv=none; d=google.com; s=arc-20160816; b=MREXtMSHilMjVz8EaYbZRjCxeQMsP8mdKEOPGvIiOSW3I+yQWtKq9oKziXM4SYNySY Zyn5Q7heXz17QJfDxMhFWsEVjKcKJTM18mEFptzg4rcxUXk5HhWKnw83NZKZbfmJvDjr gGbV5K0czjo3iYPQJ4gqX49IFrBvPwR7QniaMPqYS+GTWfL0WM0UGOmI2mnh3AVFTFel WUm41of+Wo4suVFWam60C3jsO8SvC/gC7JRN3Quya7IrJQGdo7oDkcXOjHRoeMT4/D5D qG3ExkdI0vh5aDx9XbtzN/ohOT4NJrOm4Pb1sx4UHgSQVWnejR0wuC3kjgbY/HIlLb8L u9rA== 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:arc-authentication-results; bh=5AgmHpkSgf5MatBZgDWG8g8DGb5TcO1QDA+RMHVei7M=; b=JUBmTgoZ71nIO8Hk8xBsuUK+9m//kceyPKuqeWX1H84M5Pz0AmhhkNkE4HNytrAQpg 9ptEkVJX6bX3MwwTgjyM8zmOFNbkkCHnoQSI1uinhxg5cxsraICZG+JgS+2FL7Up7Odb au1IedeaKFkgmJPWI+GWRUofSRHPAfiNLczBAIW6m+IhYKmI8hB9BK3f+1M6XthtchjD oxErGRhDgUyAaMzE1L1yI+/PnspZVgCtJVeRYZEEHMAq8xXBFSWCyVqjCsYu83gpalIi JkwcdG/bGfh9IqtShk9qXGPZIVO1kjZStyOlsWQbBaHCKkf1+tm57R9sUMPazF9histo swfw== ARC-Authentication-Results: i=1; mx.google.com; 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 n22si5529799pgc.121.2018.04.05.07.29.20; Thu, 05 Apr 2018 07:29:35 -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; 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 S1751451AbeDEO1y (ORCPT + 99 others); Thu, 5 Apr 2018 10:27:54 -0400 Received: from mx2.suse.de ([195.135.220.15]:43748 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751179AbeDEO1x (ORCPT ); Thu, 5 Apr 2018 10:27:53 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 01E9CAC43; Thu, 5 Apr 2018 14:27:52 +0000 (UTC) Date: Thu, 5 Apr 2018 16:27:49 +0200 From: Michal Hocko To: Matthew Wilcox Cc: Joel Fernandes , Steven Rostedt , Zhaoyang Huang , Ingo Molnar , LKML , kernel-patch-test@lists.linaro.org, Andrew Morton , "open list:MEMORY MANAGEMENT" , Vlastimil Babka Subject: Re: [PATCH v1] kernel/trace:check the val against the available mem Message-ID: <20180405142749.GL6312@dhcp22.suse.cz> References: <20180403093245.43e7e77c@gandalf.local.home> <20180403135607.GC5501@dhcp22.suse.cz> <20180404062340.GD6312@dhcp22.suse.cz> <20180404101149.08f6f881@gandalf.local.home> <20180404142329.GI6312@dhcp22.suse.cz> <20180404114730.65118279@gandalf.local.home> <20180405025841.GA9301@bombadil.infradead.org> <20180405142258.GA28128@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180405142258.GA28128@bombadil.infradead.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 05-04-18 07:22:58, Matthew Wilcox wrote: > On Wed, Apr 04, 2018 at 09:12:52PM -0700, Joel Fernandes wrote: > > On Wed, Apr 4, 2018 at 7:58 PM, Matthew Wilcox wrote: > > > On Wed, Apr 04, 2018 at 11:47:30AM -0400, Steven Rostedt wrote: > > >> I originally was going to remove the RETRY_MAYFAIL, but adding this > > >> check (at the end of the loop though) appears to have OOM consistently > > >> kill this task. > > >> > > >> I still like to keep RETRY_MAYFAIL, because it wont trigger OOM if > > >> nothing comes in and tries to do an allocation, but instead will fail > > >> nicely with -ENOMEM. > > > > > > I still don't get why you want RETRY_MAYFAIL. You know that tries > > > *harder* to allocate memory than plain GFP_KERNEL does, right? And > > > that seems like the exact opposite of what you want. > > > > No. We do want it to try harder but not if its already setup for failure. > > I understand you don't want GFP_NORETRY. But why is it more important for > this allocation to succeed than other normal GFP_KERNEL allocations? I guess they simply want a failure rather than OOM even when they can shoot themselves into head by using oom_origin. It is still quite ugly to see OOM report... -- Michal Hocko SUSE Labs