From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751393AbWFLQnZ (ORCPT ); Mon, 12 Jun 2006 12:43:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750846AbWFLQnZ (ORCPT ); Mon, 12 Jun 2006 12:43:25 -0400 Received: from omx2-ext.sgi.com ([192.48.171.19]:22154 "EHLO omx2.sgi.com") by vger.kernel.org with ESMTP id S1751393AbWFLQnZ (ORCPT ); Mon, 12 Jun 2006 12:43:25 -0400 Date: Mon, 12 Jun 2006 09:43:17 -0700 (PDT) From: Christoph Lameter To: Rohit Seth cc: Andrew Morton , Linux-mm@kvack.org, Linux-kernel@vger.kernel.org Subject: Re: [PATCH]: Adding a counter in vma to indicate the number of physical pages backing it In-Reply-To: <1149903235.31417.84.camel@galaxy.corp.google.com> Message-ID: References: <1149903235.31417.84.camel@galaxy.corp.google.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 9 Jun 2006, Rohit Seth wrote: > There is currently /proc//smaps that prints the detailed > information about the usage of physical pages but that is a very > expensive operation as it traverses all the PTs (for some one who is > just interested in getting that data for each vma). Adding a new counter to a vma may cause a bouncing cacheline etc. I would think that such a counter is far more expensive than occasional scans through the page table because someone is curious about the number of page in use. /proc//numa_maps also uses these scans to determine dirty pages etc.