Re: [RFC Patch] getrusage: fill ru_ixrss, ru_idrss and ru_isrss fields

From: Cong Wang
Date: Tue Dec 08 2009 - 04:32:06 EST


KOSAKI Motohiro wrote:
KOSAKI Motohiro wrote:
The next three fields, the subject of this patch, are named ru_XXrss:
though the 80-column comment omits to say "resident set" before "size",
I believe they'd be expected to account (subdivided) resident set sizes?


your calculation is not rss nor not integral.

Hmm, I misunderstood rss here. Does it mean the memory stayed in
physical mem? i.e. not swapped out.

Yes.

Plus, 'integral' mean "tick * rss". but in dyntick environment, per tick statistics is not
so easy nor low cost.

Thanks for explanation!


So, if I want to get those rss statistics, I have to add some more
mm_counter by myself? I only find file_rss and anon_rss in mm_struct.

Hmm..
I doubt nobody use such statistics. if nobody explain real world usage, I oppose to add
new counter overhead.

Well, this is one of the usages. :)

I just checked more, I found it's not easy to add rss statistics for
stack, executable, etc... the reason is that we don't have a page flag
to mark a page as used for stack etc.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/