From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758556AbcILMDI (ORCPT ); Mon, 12 Sep 2016 08:03:08 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36577 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758426AbcILMCv (ORCPT ); Mon, 12 Sep 2016 08:02:51 -0400 Date: Mon, 12 Sep 2016 14:02:48 +0200 From: Michal Hocko To: robert.foss@collabora.com Cc: corbet@lwn.net, akpm@linux-foundation.org, vbabka@suse.cz, hughd@google.com, koct9i@gmail.com, n-horiguchi@ah.jp.nec.com, kirill.shutemov@linux.intel.com, john.stultz@linaro.org, minchan@kernel.org, ross.zwisler@linux.intel.com, jmarchan@redhat.com, hannes@cmpxchg.org, keescook@chromium.org, oleg@redhat.com, viro@zeniv.linux.org.uk, mguzik@redhat.com, jdanis@google.com, calvinowens@fb.com, adobriyan@gmail.com, ebiederm@xmission.com, sonnyrao@chromium.org, seth.forshee@canonical.com, tixxdz@gmail.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Ben Zhang , Bryan Freed , Filipe Brandenburger , Jann Horn , linux-api@vger.kernel.org, Jacek Anaszewski Subject: Re: [PATCH v5 0/3] mm, proc: Implement /proc//totmaps Message-ID: <20160912120248.GK14524@dhcp22.suse.cz> References: <1473106449-12847-1-git-send-email-robert.foss@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1473106449-12847-1-git-send-email-robert.foss@collabora.com> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 05-09-16 16:14:06, robert.foss@collabora.com wrote: > From: Robert Foss > > This series provides the /proc/PID/totmaps feature, which > summarizes the information provided by /proc/PID/smaps for > improved performance and usability reasons. > > A use case is to speed up monitoring of memory consumption in > environments where RSS isn't precise. > > For example Chrome tends to many processes which have hundreds of VMAs > with a substantial amount of shared memory, and the error of using > RSS rather than PSS tends to be very large when looking at overall > memory consumption. PSS isn't kept as a single number that's exported > like RSS, so to calculate PSS means having to parse a very large smaps > file. > > This process is slow and has to be repeated for many processes, and we > found that the just act of doing the parsing was taking up a > significant amount of CPU time, so this patch is an attempt to make > that process cheaper. I still maintain my concerns about a single pss value. It might work in a very specific situations where the consumer knows what is shared but other than that the value can be more misleading than helpful. So a NACK from me until I am shown that this is usable in general and still helpful. -- Michal Hocko SUSE Labs