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 X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CBD9C4363C for ; Fri, 2 Oct 2020 16:23:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B4E7620758 for ; Fri, 2 Oct 2020 16:23:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="ZkmI1e0A" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4E7620758 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 532CA6B005C; Fri, 2 Oct 2020 12:23:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4E30D6B005D; Fri, 2 Oct 2020 12:23:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3D4A96B006C; Fri, 2 Oct 2020 12:23:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0219.hostedemail.com [216.40.44.219]) by kanga.kvack.org (Postfix) with ESMTP id 10E956B005C for ; Fri, 2 Oct 2020 12:23:42 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 96373180AD806 for ; Fri, 2 Oct 2020 16:23:41 +0000 (UTC) X-FDA: 77327506242.28.store99_230045b271a5 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id 6CA196C04 for ; Fri, 2 Oct 2020 16:23:41 +0000 (UTC) X-HE-Tag: store99_230045b271a5 X-Filterd-Recvd-Size: 4293 Received: from m42-4.mailgun.net (m42-4.mailgun.net [69.72.42.4]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Fri, 2 Oct 2020 16:23:39 +0000 (UTC) DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1601655819; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=uEPu1FRcUu9u8HJMWtnVjI5EIS8OxL5zgVv90u9nEAI=; b=ZkmI1e0Ay7fKSs+Rz6/j6/KpwOsdxMuATGGnqzk7Gh/2CiyfaWLF9c8mzOdUBXCSKzxRulWX XGAI8Fvd5qmY4Sa7XgbbHIF9kwnL2gTzL0YPB+wAzjI0dG618k/U9CkJbDEu+vrp2LtCB43B sdH3ebnrZFXjpyjf6lcguPFhuJk= X-Mailgun-Sending-Ip: 69.72.42.4 X-Mailgun-Sid: WyIwY2Q3OCIsICJsaW51eC1tbUBrdmFjay5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n07.prod.us-east-1.postgun.com with SMTP id 5f77540a0764f13b00589cdf (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 02 Oct 2020 16:23:38 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 34ED8C433CB; Fri, 2 Oct 2020 16:23:38 +0000 (UTC) Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: pintu) by smtp.codeaurora.org (Postfix) with ESMTPSA id A8E1FC433FE; Fri, 2 Oct 2020 16:23:37 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 02 Oct 2020 21:53:37 +0530 From: pintu@codeaurora.org To: Michal Hocko Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, linux-mm@kvack.org, pintu.ping@gmail.com Subject: Re: [PATCH] mm/util.c: Add error logs for commitment overflow In-Reply-To: <20201002121726.GF4555@dhcp22.suse.cz> References: <1601639861-32171-1-git-send-email-pintu@codeaurora.org> <20201002121726.GF4555@dhcp22.suse.cz> Message-ID: X-Sender: pintu@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 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 2020-10-02 17:47, Michal Hocko wrote: >> __vm_enough_memory: commitment overflow: ppid:150, pid:164, >> pages:62451 >> fork failed[count:0]: Cannot allocate memory > > While I understand that fork failing due to overrcomit heuristic is non > intuitive and I have seen people scratching heads due to this in the > past I am not convinced this is a right approach to tackle the problem. Dear Michal, First, thank you so much for your review and comments. I totally agree with you. > First off, referencing pids is not really going to help much if process > is short lived. Yes, I agree with you. But I think this is most important mainly for short lived processes itself. Because, when this situation occurs, no one knows who could be the culprit. However, user keeps dumping "ps" or "top" in background to reproduce once again. At this time, we can easily match the pid, process-name (at least in most cases). > Secondly, __vm_enough_memory is about any address space > allocation. Why would you be interested in parent when doing mmap? > Yes agree, we can remove ppid from here. I thought it might be useful at least in case of fork (or short lived process). > Last but not least _once is questionable as well. The first instance > might happen early during the system lifetime and you will not learn > about future failures so the overall point of debuggability is > seriously > inhibited. > > Maybe what you want is to report higher up the call chain (fork?) and > have it ratelimited rather than _once? Or maybe just try to live with > the confusing situation? > Okay agree. I can change to pr_err_ratelimited. In-fact, initially I thought to use ratelimited itself but then I thought just once also should be fine at least. Thanks, Pintu