From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756066AbbJANaK (ORCPT ); Thu, 1 Oct 2015 09:30:10 -0400 Received: from e28smtp07.in.ibm.com ([122.248.162.7]:38520 "EHLO e28smtp07.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755560AbbJANaE (ORCPT ); Thu, 1 Oct 2015 09:30:04 -0400 X-Helo: d28dlp03.in.ibm.com X-MailFrom: khandual@linux.vnet.ibm.com X-RcptTo: linux-kernel@vger.kernel.org Message-ID: <560D3542.6060903@linux.vnet.ibm.com> Date: Thu, 01 Oct 2015 18:59:38 +0530 From: Anshuman Khandual User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Pintu Kumar , akpm@linux-foundation.org, minchan@kernel.org, dave@stgolabs.net, mhocko@suse.cz, koct9i@gmail.com, rientjes@google.com, hannes@cmpxchg.org, penguin-kernel@i-love.sakura.ne.jp, bywxiaobai@163.com, mgorman@suse.de, vbabka@suse.cz, js1304@gmail.com, kirill.shutemov@linux.intel.com, alexander.h.duyck@redhat.com, sasha.levin@oracle.com, cl@linux.com, fengguang.wu@intel.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org CC: cpgs@samsung.com, pintu_agarwal@yahoo.com, pintu.ping@gmail.com, vishnu.ps@samsung.com, rohit.kr@samsung.com, c.rajkumar@samsung.com, sreenathd@samsung.com Subject: Re: [PATCH 1/1] mm: vmstat: Add OOM kill count in vmstat counter References: <1443696523-27262-1-git-send-email-pintu.k@samsung.com> In-Reply-To: <1443696523-27262-1-git-send-email-pintu.k@samsung.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15100113-0025-0000-0000-0000073EC070 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/01/2015 04:18 PM, Pintu Kumar wrote: > This patch maintains number of oom calls and number of oom kill > count in /proc/vmstat. > It is helpful during sluggish, aging or long duration tests. > Currently if the OOM happens, it can be only seen in kernel ring buffer. > But during long duration tests, all the dmesg and /var/log/messages* could > be overwritten. > So, just like other counters, the oom can also be maintained in > /proc/vmstat. > It can be also seen if all logs are disabled in kernel. Makes sense. > > A snapshot of the result of over night test is shown below: > $ cat /proc/vmstat > oom_stall 610 > oom_kill_count 1763 > > Here, oom_stall indicates that there are 610 times, kernel entered into OOM > cases. However, there were around 1763 oom killing happens. > The OOM is bad for the any system. So, this counter can help the developer > in tuning the memory requirement at least during initial bringup. Can you please fix the formatting of the commit message above ? > > Signed-off-by: Pintu Kumar > --- > include/linux/vm_event_item.h | 2 ++ > mm/oom_kill.c | 2 ++ > mm/page_alloc.c | 2 +- > mm/vmstat.c | 2 ++ > 4 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/include/linux/vm_event_item.h b/include/linux/vm_event_item.h > index 2b1cef8..ade0851 100644 > --- a/include/linux/vm_event_item.h > +++ b/include/linux/vm_event_item.h > @@ -57,6 +57,8 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, > #ifdef CONFIG_HUGETLB_PAGE > HTLB_BUDDY_PGALLOC, HTLB_BUDDY_PGALLOC_FAIL, > #endif > + OOM_STALL, > + OOM_KILL_COUNT, Removing the COUNT will be better and in sync with others.