archive mirror
 help / color / mirror / Atom feed
To: Hugh Dickins <>
Cc: "" <>,
	"" <>
Subject: Re: [Help] : RSS/PSS showing 0 during smaps for Xorg
Date: Tue, 24 Jan 2012 21:22:06 -0800 (PST)	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <alpine.LSU.2.00.1201231125200.1677@eggly.anvils>

>From: Hugh Dickins <>
>Cc: "" <>; "" <> 
>Sent: Tuesday, 24 January 2012 1:01 AM
>Subject: Re: [Help] : RSS/PSS showing 0 during smaps for Xorg
>On Mon, 23 Jan 2012, PINTU KUMAR wrote:
>> Dear All,
>> I am facing one problem for one of my kernel module for our linux mobile with kernel2.6.36.
>> When I do cat /proc/<Xorg pid>/smaps | grep -A 11 /dev/ump , to track information for my ump module,
>> we always get Rss/Pss as 0 kB as shown below:
>> cat /proc/1731/smaps | grep -A 11 /dev/ump
>> 414db000-415ff000 rw-s 00015000 00:12 6803       /dev/ump
>> Size:               1168 kB
>> Rss:                   0 kB
>> Pss:                   0 kB
>> track_rss_value = 0, iswalkcalled = 1, smap_pte_range_called = 1, swap_pte = 0, not_pte_present = 0, not_normal_page = 1
>> isspecial = 0, not_special = 1, isMixedMap = 0, pfnpages_null = 0, pfnoff_flag = 0, not_cow_mapping = 1, normal_page_end = 0
>> After tracing down the problem, I found out that during "show_smaps" in fs/proc/task_mmu.c and during call to smaps_pte_range the vm_normal_page() is always returning NULL for our /dev/ump driver.
>> (smaps_pte_range() is the place where Rss/Pss information is populated)
>> Thus mss->resident (Rss value) is never getting incremented.  
>> To trace the problem I added few flags during show_smaps & vm_normal_page() as shown above. The value of 1 indicates that the condition is executed.
>> Thus "normal_page_end" indicates that the "vm_normal_page" has never ended successfully and always returns from 
>> "!is_cow_mapping()".
>> So, I wanted to know the main cause for vm_normal_page() always returning NULL page for our ump driver. 
>> What is that I am missing in my driver ?
>> Can anyone please let me know what could be the problem in our driver.
>This not evidence of any problem in your driver.
>vm_normal_page() returns NULL because the pages mapped by your driver
>are not normal faultable and reclaimable pages, but an area of physical
>memory mapped in by remap_pfn_range(), which sets the VM_PFNMAP flag.
>The mm subsystem does not count such pages towards rss (or pss),
>hence your 0s.

Dear Mr. Hugh,
Thank you very much for your reply.
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 "struct page" right???
Is is possible to convert these pages to a normal struct pages so that we can get the Rss/Pss value??
Also, the VM_PFNMAP is being set for all dirvers during remap_pfn_range and stills shows Rss/Pss for other drivers.
Then why it is not shown for our driver?
How to avoid remap_pfn_range to not to set VM_PFNMAP for our driver?
Please let me know.
Thanks, Regards,

  reply	other threads:[~2012-01-25  5:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <>
2012-01-23 10:15 ` [Help] : RSS/PSS showing 0 during smaps for Xorg PINTU KUMAR
2012-01-23 19:31   ` Hugh Dickins
2012-01-25  5:22     ` PINTU KUMAR [this message]
2012-01-26  0:59       ` Hugh Dickins
2012-01-30  8:42         ` PINTU KUMAR
2012-01-30 18:49           ` Hugh Dickins
2012-02-01 14:49             ` PINTU KUMAR
2012-02-02  5:20               ` Hugh Dickins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).