From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752514Ab2AZBAf (ORCPT ); Wed, 25 Jan 2012 20:00:35 -0500 Received: from mail-pw0-f46.google.com ([209.85.160.46]:40172 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752238Ab2AZA74 (ORCPT ); Wed, 25 Jan 2012 19:59:56 -0500 Date: Wed, 25 Jan 2012 16:59:41 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: PINTU KUMAR cc: "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: [Help] : RSS/PSS showing 0 during smaps for Xorg In-Reply-To: <1327468926.52380.YahooMailNeo@web162002.mail.bf1.yahoo.com> Message-ID: References: <1327310360.96918.YahooMailNeo@web162003.mail.bf1.yahoo.com> <1327313719.76517.YahooMailNeo@web162002.mail.bf1.yahoo.com> <1327468926.52380.YahooMailNeo@web162002.mail.bf1.yahoo.com> User-Agent: Alpine 2.00 (LSU 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323584-1564816580-1327539584=:2141" 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. --8323584-1564816580-1327539584=:2141 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 24 Jan 2012, PINTU KUMAR wrote: > =A0 > Is there a way to convert our mapped pages to a normal pages. I tried pfn= _to_page() but no effect. > I mean the page is considered normal only if it is associated with "struc= t page" right??? > Is is possible to convert these pages to a normal struct pages so that we= can get the Rss/Pss value?? I don't understand why you are so anxious to see non-0 numbers there. I don't know if the pages you are mapping with remap_pfn_range() are ordinary pages in normal memory, and so already have struct pages, or not. > =A0 > Also, the VM_PFNMAP is being set for all dirvers during remap_pfn_range a= nd stills shows Rss/Pss for other drivers. I'm surprised. It is possible to set up a private-writable VM_PFNMAP area, which can then contain ordinary private copies of the underlying pages, and these copies will count to Rss. But I thought that was very unusual. You don't mention which drivers these are that use remap_pfn_range yet show Rss (and I don't particularly want to spend time researching them). I can see three or four places in drivers/ where VM_PFNMAP is set, perhaps without going through remap_pfn_range(): that seems prone to error, I wouldn't recommend going that route. > Then why it is not shown for our driver? > How to avoid remap_pfn_range to not to set VM_PFNMAP for our driver? If these are ordinary pages with struct pages, then you could probably use a loop of vm_insert_page()s to insert them at mmap time, or a fault routine to insert them on fault. But as I said, I don't know if this memory is part of the ordinary page pool or not. Really, the question has to be, why do you need to see non-0s there? Hugh --8323584-1564816580-1327539584=:2141--