Received: by 10.213.65.68 with SMTP id h4csp2001889imn; Thu, 5 Apr 2018 07:24:32 -0700 (PDT) X-Google-Smtp-Source: AIpwx48XC8pmB02olGSl+roAnf9SxWgZ9h7QH1h6BQY1Yo/gXbPaTMvhx8JUpuLDjmEzrww8HFQv X-Received: by 2002:a17:902:848c:: with SMTP id c12-v6mr1447512plo.316.1522938272218; Thu, 05 Apr 2018 07:24:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522938272; cv=none; d=google.com; s=arc-20160816; b=VIMrC/j/CRVPpfv/xyRRn9VZZJdIe1qEllYI7m6HHO+3/QSfInS0Av7rQCZuNI2uQR NwrdqsyZ9qIkmUCVmKNRtS2M4DiduReLYpe+lVVGmkHc9AYoqwQ0H+1/qHcCb5LfVnWC iHgwTa+F2xRG7xMwH2Fc4jAY1iOo+cEpzkT9vIp+8G0Xmq+IGTZcdIJ92hJzLUpxksed ISP88zZuywDCVjTaS+Ds4KVsgvAkWNwdG7s43B2ajoS8awEEfWFL6s3K5BHyMJLQbnrK 0JzFiThoa9lO5nzzVvVcNkEMlOb3/RA256Ssxu6PucGb54cpzRMnQz3DEt9RgyuQRVJ3 XjPw== 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=LkH9SoisImElcZ/ipSR9h6/NrdWOQXAXIESRDCYs9Jg=; b=IGOfJP9L0IhbzFcyqPjIh4orhcg/B2dk8vbFiU6cCvV7WAAJ5BY4i3ajM13sFp2syO j+WUkDd14PX2rA+lvftfjFo//rP8BLX1NrQdhsIwXQIK+siH67KtJ68Z4fVqgMjMy4T3 hbZKFpBzTf1FOJv3k+9vpuFOzuc9N3qrpjM+Feqk3swdE8BdiXru7wLgkN6EUjet6c8v lDgAYBSamQoMoBRbFANGFsIZsXgzY3q6LjrnOKTO9WHDvtzhube0GG4RZZp/5M4rPfBt n1+xHhO08reaa+HWbzxVbRI/KmmenshQw3Ulh04aixrnwWU2aLXm9MaHY4HAOm/isrES pO+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=EMUWgdyj; 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 x8si4138029pfh.245.2018.04.05.07.24.17; Thu, 05 Apr 2018 07:24:32 -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=EMUWgdyj; 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 S1751363AbeDEOXC (ORCPT + 99 others); Thu, 5 Apr 2018 10:23:02 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:56876 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751179AbeDEOXB (ORCPT ); Thu, 5 Apr 2018 10:23:01 -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=LkH9SoisImElcZ/ipSR9h6/NrdWOQXAXIESRDCYs9Jg=; b=EMUWgdyjElECNV8Ut3PxOClDz sZ7BP6CDCrqU07lIYs6/TH3a4clkN/IXkbU9LwMaAMBr6d9hzZZR7y23ovK165OT+Kj7J97I7ejJ+ dEgdTqE/DvSE4trjkgFpHWpfus2epZuM6FgKvZ8gtbDkDxoDS2W0Bb/3GukiRbHqX9e7LMFaU1mpc xrdmoWlTuhnvweh1y6oYYPkXjnTQouoHSwXhde0MVodpwKXfaTo6XEzDPT5qO4oWzSp7Go2byTK9a n02okxAiY1SVMc66bSGpi1z1XRifpar/T3+uc4TPccGVl7aAGgNmNFI66wjDLFzW1KWIhrSUjFSax VcIDHqBfA==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1f45n0-0001ZE-UR; Thu, 05 Apr 2018 14:22:58 +0000 Date: Thu, 5 Apr 2018 07:22:58 -0700 From: Matthew Wilcox To: Joel Fernandes Cc: Steven Rostedt , Michal Hocko , 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: <20180405142258.GA28128@bombadil.infradead.org> References: <20180403123514.GX5501@dhcp22.suse.cz> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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?