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 58937C4363D for ; Fri, 2 Oct 2020 12:11:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id ECB9C206DB for ; Fri, 2 Oct 2020 12:11:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="wBuNSwrt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ECB9C206DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D6E416B0062; Fri, 2 Oct 2020 08:11:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D460F900002; Fri, 2 Oct 2020 08:11:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C346C6B006C; Fri, 2 Oct 2020 08:11:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0062.hostedemail.com [216.40.44.62]) by kanga.kvack.org (Postfix) with ESMTP id 94F9E6B0062 for ; Fri, 2 Oct 2020 08:11:48 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 26F021EFF for ; Fri, 2 Oct 2020 12:11:48 +0000 (UTC) X-FDA: 77326871496.07.fly53_0707c8c271a4 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id 0DA9E1803F9AF for ; Fri, 2 Oct 2020 12:11:48 +0000 (UTC) X-HE-Tag: fly53_0707c8c271a4 X-Filterd-Recvd-Size: 2585 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Fri, 2 Oct 2020 12:11:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=wAkAIyuFajetfoFJ3id7YILxbAP0xrZwqSUaItPSmak=; b=wBuNSwrt2N0rJBcY3sIwOzP3CQ Hp2kkS+Cz0RwwtwpKroEBXj0o/10s2mt8595FKa8hgrPyyDcwHdo6C3amifbi0JTGY4wj9jryhO6e sUNndacSikgohw+0kLZ2uaFjxf/GIscI6Yq8zevDW29hURF0ZasNuh4jCPDoMbZfWn3NL8R322SUZ UVZwrf/ZAkZEQzR4QpKLj1uU+ELJxWnutXSukqUBM1wLy9JDK2tpJV84884GdzxIpAHBLlOmgYHg4 WjzmsYo9+IKGmneHXA25375lsilsEMCKcq2CJ9tRUQovAkzXcuoDu4ncBzMuBCWT+HbRwC4LgHnv2 fQl+V8jQ==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOJuT-0002cx-IC; Fri, 02 Oct 2020 12:11:37 +0000 Date: Fri, 2 Oct 2020 13:11:37 +0100 From: Matthew Wilcox To: Pintu Kumar 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 Message-ID: <20201002121137.GY20115@casper.infradead.org> References: <1601639861-32171-1-git-send-email-pintu@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1601639861-32171-1-git-send-email-pintu@codeaurora.org> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000056, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Oct 02, 2020 at 05:27:41PM +0530, Pintu Kumar wrote: > This is the output we can see on a 256MB system and with a simple malloc > and fork program. > > [root@ ~]# cat /proc/meminfo > MemTotal: 249520 kB ==> 243MB > MemFree: 179100 kB > > PPID PID USER RSS VSZ STAT ARGS > 150 164 root 1440 250580 S ./consume-and-fork.out 243 > > __vm_enough_memory: commitment overflow: ppid:150, pid:164, pages:62451 > fork failed[count:0]: Cannot allocate memory I don't think the __func__ is particularly useful information. I would also expect the name of the process to be more interesting than the PID. And why is the ppid useful? Wouldn't this message be more useful? fork: Would overcommit system (pid:162 name:./consume-and-fork.out) ie put it in dup_mmap() and use current->comm > + pr_err_once("%s: commitment overflow: ppid:%d, pid:%d, pages:%ld\n", > + __func__, current->parent->pid, current->pid, pages); > +