From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2993913AbcBSVNM (ORCPT ); Fri, 19 Feb 2016 16:13:12 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:45716 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2993863AbcBSVNJ (ORCPT ); Fri, 19 Feb 2016 16:13:09 -0500 Date: Fri, 19 Feb 2016 13:13:07 -0800 From: Andrew Morton To: Konstantin Khlebnikov Cc: Hugh Dickins , Johannes Weiner , "linux-mm@kvack.org" , Rik van Riel , Mel Gorman , Linux Kernel Mailing List , kernel-team@fb.com Subject: Re: [RFC PATCH] proc: do not include shmem and driver pages in /proc/meminfo::Cached Message-Id: <20160219131307.a38646706cc514fcaf18793a@linux-foundation.org> In-Reply-To: References: <1455827801-13082-1-git-send-email-hannes@cmpxchg.org> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 19 Feb 2016 09:40:45 +0300 Konstantin Khlebnikov wrote: > >> What are your thoughts on this? > > > > My thoughts are NAK. A misleading stat is not so bad as a > > misleading stat whose meaning we change in some random kernel. > > > > By all means improve Documentation/filesystems/proc.txt on Cached. > > By all means promote Active(file)+Inactive(file)-Buffers as often a > > better measure (though Buffers itself is obscure to me - is it intended > > usually to approximate resident FS metadata?). By all means work on > > /proc/meminfo-v2 (though that may entail dispiritingly long discussions). > > > > We have to assume that Cached has been useful to some people, and that > > they've learnt to subtract Shmem from it, if slow or no swap concerns them. > > > > Added Konstantin to Cc: he's had valuable experience of people learning > > to adapt to the numbers that we put out. > > > > I think everything will ok. Subtraction of shmem isn't widespread practice, > more like secret knowledge. This wasn't documented and people who use > this should be aware that this might stop working at any time. So, ACK. It worries me as well - we're deliberately altering the behaviour of existing userspace code. Not all of those alterations will be welcome! We could add a shiny new field into meminfo and train people to migrate to that. But that would just be a sum of already-available fields. In an ideal world we could solve all of this with documentation and cluebatting (and some apologizing!).