[<prev] [next>] [day] [month] [year] [list]
Message-ID: <56F14EEE.7060308@huawei.com>
Date: Tue, 22 Mar 2016 21:55:58 +0800
From: Xishi Qiu <qiuxishi@...wei.com>
To: Linux MM <linux-mm@...ck.org>, LKML <linux-kernel@...r.kernel.org>
Subject: [RFC] mm: why cat /proc/pid/smaps | grep Rss is different from cat
/proc/pid/statm?
[root@...alhost c_test]# cat /proc/3948/smaps | grep Rss
Rss: 4 kB
Rss: 4 kB
Rss: 4 kB
Rss: 796 kB
Rss: 0 kB
Rss: 16 kB
Rss: 8 kB
Rss: 12 kB
Rss: 132 kB
Rss: 12 kB
Rss: 4 kB
Rss: 4 kB
Rss: 4 kB
Rss: 4 kB
Rss: 12 kB
Rss: 0 kB
Rss: 4 kB
Rss: 0 kB
[root@...alhost c_test]# cat /proc/3948/statm
1042 173 154 1 0 48 0
173 means Rss is 173*4kb=692kb, right?
so why it is different from the sum(1020kb) of "cat /proc/pid/smaps | grep Rss"?
my test code is
...
int main()
{
sleep(1000);
return 0;
}
the kernel version is v4.1
Thanks,
Xishi Qiu
Powered by blists - more mailing lists