From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965642AbXBGF4k (ORCPT ); Wed, 7 Feb 2007 00:56:40 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965643AbXBGF4k (ORCPT ); Wed, 7 Feb 2007 00:56:40 -0500 Received: from smtp-out.google.com ([216.239.45.13]:3337 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965642AbXBGF4j (ORCPT ); Wed, 7 Feb 2007 00:56:39 -0500 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=received:date:from:x-x-sender:to:cc:subject:in-reply-to: message-id:references:mime-version:content-type; b=i/vW3xQ7cRnn2LOkaCE5mJ49i1ArBVCk2Q3AZ3B00h5kmb2UVKNF7tTjrrGY2QTwa 5s8MX0o50xX8+KwlIw1qw== Date: Tue, 6 Feb 2007 21:56:23 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Andrew Morton cc: Hugh Dickins , Paul Mundt , Christoph Lameter , linux-kernel@vger.kernel.org Subject: Re: [patch 2/3] smaps: add pages referenced count to smaps In-Reply-To: <20070206214414.96b0336b.akpm@linux-foundation.org> Message-ID: References: <20070206214414.96b0336b.akpm@linux-foundation.org> 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 Tue, 6 Feb 2007, Andrew Morton wrote: > > @@ -190,18 +191,20 @@ static int show_map_internal(struct seq_file *m, void *v, struct mem_size_stats > > > > if (mss) > > seq_printf(m, > > - "Size: %8lu kB\n" > > - "Rss: %8lu kB\n" > > - "Shared_Clean: %8lu kB\n" > > - "Shared_Dirty: %8lu kB\n" > > - "Private_Clean: %8lu kB\n" > > - "Private_Dirty: %8lu kB\n", > > + "Size: %8lu kB\n" > > + "Rss: %8lu kB\n" > > + "Shared_Clean: %8lu kB\n" > > + "Shared_Dirty: %8lu kB\n" > > + "Private_Clean: %8lu kB\n" > > + "Private_Dirty: %8lu kB\n" > > + "Pgs_Referenced: %8li\n", > > I guess we might as well make this %8lu kB as well? > Ah, %8lu would work since it's a count of pages and not a size. > This is testing the software-referenced bit. We want to be counting the > pte-referenced bits (pte_young). > > Hence poking clear_refs should run pte_mkold(). > > Perhaps we should also be running ClearPageReferenced and counting pages > which are pte_young()||PageReferenced. > Ok.