From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
Description of problem:
Quoting Hugh Dickins:
"The third "shared" field of /proc/$pid/statm in 2.4 was a count of
pages in the mm whose page_count is more than 1 (oddly, including
pages shared just with swapcache). That's too costly to calculate
each time, so 2.6 changed it to the total file-backed extent. But
Andrea knows apps and users surprised when (rss - shared) goes
negative: we need to provide an rss-like statistic, close to the 2.4
Something that's quick and easy to maintain accurately is
mm->anon_rss, the count of anonymous pages in the mm. Then shared =
rss - anon_rss gives a pretty good and meaningful approximation to
2.4's intention: wli confirms that this will be useful to Oracle too."
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Run "top"
Actual Results: PID USER PR NI VIRT RES SHR S %CPU %MEM
3098 root 17 0 3292 924 1664 R 1.0 0.5 0:01.11 top
Expected Results: SHR < RES
Please consider merging Hugh's patches from 2.6.10-rc2:
these have been merged already. thanks.