On Sat, 30 Aug 2014 01:21:12 +0530, ravali pullela said: > The problem is that when i looked inside get_mm_rss function, it returns > get_mm_counter(mm, MM_FILEPAGES) + > get_mm_counter(mm, MM_ANONPAGES); > > I thought that anonymous and file pages cover all vm areas like stack, > heap, code, data etc., but it does not look like. So, what is it that I am > missing. Perhaps nothing. Perhaps everything. Perhaps RSS isn't even the right knob to be looking at. There's different ways to calculate RSS, and which one you use depends on what question you're trying to answer, and what problem you're trying to solve. Which is why your method agrees with what summing /proc/self/smaps has, but doesn't match what get_mm_counter() is telling you. In particular, things like shared pages need different handling based on what the problem is - if N processes share the page, does each process get charged 1 per page, or 1/N per page? So what problem are you trying to solve by knowing the RSS of a process, and why does a module care? (Apologies if I missed the post)
Attachment:
pgpJy5OlKQiRW.pgp
Description: PGP signature
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies