Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161088AbbBCUQk (ORCPT ); Tue, 3 Feb 2015 15:16:40 -0500 Received: from mail-ie0-f176.google.com ([209.85.223.176]:40073 "EHLO mail-ie0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756284AbbBCUQi (ORCPT ); Tue, 3 Feb 2015 15:16:38 -0500 Date: Tue, 3 Feb 2015 12:16:32 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Minchan Kim cc: Petr Cermak , Primiano Tucci , "Kirill A. Shutemov" , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Bjorn Helgaas , Hugh Dickins Subject: Re: [PATCH v2 2/2] task_mmu: Add user-space support for resetting mm->hiwater_rss (peak RSS) In-Reply-To: <20150203155103.GB2644@blaptop> Message-ID: References: <20150107172452.GA7922@node.dhcp.inet.fi> <20150114152225.GB31484@google.com> <20150114233630.GA14615@node.dhcp.inet.fi> <20150203032628.GA4006@google.com> <20150203155103.GB2644@blaptop> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1737 Lines: 33 On Wed, 4 Feb 2015, Minchan Kim wrote: > > > This is a result of allowing something external (process B) be able to > > > clear hwm so that you never knew the value went to 100MB. That's the > > > definition of a race, I don't know how to explain it any better and making > > > any connection between clearing PG_referenced and mm->hiwater_rss is a > > > stretch. This approach just makes mm->hiwater_rss meaningless. > > > > I understand your concern, but I hope you agree that the functionality we > > are proposing would be very useful for profiling. Therefore, I suggest > > adding an extra resettable field to /proc/pid/status (e.g. > > resettable_hiwater_rss) instead. What is your view on this approach? > > The idea would be very useful for measuring working set size for > efficient memory management in userside, which becomes very popular > with many platforms for embedded world with tight memory. > The problem is the same as the aforementioned if you're only going to be adding one field. If another process happens to clear the resettable_hiwater_rss before you can read it, you don't see potentially large spikes in size. I understand the need for measuring working set size, and we have an in-house solution for that, but I don't think we should be introducing new fields that require only one root process on the system to be touching it for it to be effective. Let me talk with some people about how difficult it would be to propose our in-house solution. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/