From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754637Ab0IPQue (ORCPT ); Thu, 16 Sep 2010 12:50:34 -0400 Received: from smtp-out.google.com ([216.239.44.51]:32931 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754250Ab0IPQub (ORCPT ); Thu, 16 Sep 2010 12:50:31 -0400 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=date:from:x-x-sender:to:cc:subject:in-reply-to:message-id: references:user-agent:mime-version:content-type:x-system-of-record; b=Ydt6iDNWRoih+dyGayniIieZUTQMmCTwfb6NF5QeIDTfywONcK4t+RtrnVV0ArGIj QTlXQDKb3kUYOh0qkp61Q== Date: Thu, 16 Sep 2010 09:50:24 -0700 (PDT) From: Hugh Dickins X-X-Sender: hughd@tigran.mtv.corp.google.com To: Nikanth Karthikesan cc: KOSAKI Motohiro , Matt Mackall , Richard Guenther , Balbir Singh , linux-mm@kvack.org, Andrew Morton , Michael Matz , linux-kernel@vger.kernel.org Subject: Re: [PATCH] Document the new Anonymous field in smaps. In-Reply-To: <201009161135.00129.knikanth@suse.de> Message-ID: References: <201009160856.25923.knikanth@suse.de> <20100916125147.CA08.A69D9226@jp.fujitsu.com> <201009161135.00129.knikanth@suse.de> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="380388936-1970376381-1284655827=:24798" X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --380388936-1970376381-1284655827=:24798 Content-Type: TEXT/PLAIN; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 16 Sep 2010, Nikanth Karthikesan wrote: > Sorry, I missed to add documentation, when I sent the patch. This depends= on > the patch titled, "[PATCH] Export amount of anonymous memory in a mapping= via > smaps". >=20 > Thanks > Nikanth >=20 >=20 > Document the new Anonymous field in smaps. >=20 > Signed-off-by: Nikanth Karthikesan Thanks for adding this, but... >=20 > --- >=20 > diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesyste= ms/proc.txt > index a6aca87..75c7368 100644 > --- a/Documentation/filesystems/proc.txt > +++ b/Documentation/filesystems/proc.txt > @@ -370,6 +370,7 @@ Shared_Dirty: 0 kB > Private_Clean: 0 kB > Private_Dirty: 0 kB > Referenced: 892 kB > +Anonymous: 0 kB > Swap: 0 kB > KernelPageSize: 4 kB > MMUPageSize: 4 kB > @@ -380,7 +381,10 @@ the amount of the mapping that is currently resident= in RAM, the "proportional > set size=E2=80=9D (divide each shared page by the number of processes sh= aring it), the > number of clean and dirty shared pages in the mapping, and the number of= clean > and dirty private pages in the mapping. The "Referenced" indicates the = amount > -of memory currently marked as referenced or accessed. > +of memory currently marked as referenced or accessed. The "Anonymous" sh= ows > +the amount of mapping that is not associated with a file. Even the priva= te > +pages in a mapping associated with a file, would become anonymous, when = they > +are modified. =2E.. unfortunately it needs rewording, because you're describing it well with respect to MAP_SHARED versus MAP_PRIVATE, but /proc/pid/smaps has a different definition of whether pages are shared or private, just depending on their mapcount at the instant. Indeed, adding a comment on that would be helpful too, if you've time. > =20 > This file is only present if the CONFIG_MMU kernel configuration option = is > enabled. --380388936-1970376381-1284655827=:24798--