From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754386AbcEPJ7P (ORCPT ); Mon, 16 May 2016 05:59:15 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:5682 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754524AbcEPJ6e (ORCPT ); Mon, 16 May 2016 05:58:34 -0400 Message-ID: <573999BB.5090005@huawei.com> Date: Mon, 16 May 2016 17:58:19 +0800 From: Xishi Qiu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Michal Hocko CC: Linux MM , LKML , "Aaron Lu" Subject: Re: why the count nr_file_pages is not equal to nr_inactive_file + nr_active_file ? References: <573550D8.9030507@huawei.com> <20160516093146.GA23251@dhcp22.suse.cz> In-Reply-To: <20160516093146.GA23251@dhcp22.suse.cz> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.25.179] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.573999C2.00A3,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 380b2a55bea2dd859f1ef008348db664 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/5/16 17:31, Michal Hocko wrote: > On Fri 13-05-16 11:58:16, Xishi Qiu wrote: >> I find the count nr_file_pages is not equal to nr_inactive_file + nr_active_file. >> There are 8 cpus, 2 zones in my system. > > Because they count shmem pages as well and those are living on the anon > lru list (see shmem_add_to_page_cache). Hi Michal, But the shmem seems very small. nr_inactive_file 432444 nr_active_file 20659 nr_unevictable 2363 nr_shmem 128 nr_file_pages 462723 There is still 7129 pages difference. root@hi3650:/ # cat /proc/vmstat nr_free_pages 54192 nr_inactive_anon 39830 nr_active_anon 28794 nr_inactive_file 432444 nr_active_file 20659 nr_unevictable 2363 nr_mlock 0 nr_anon_pages 65249 nr_mapped 19742 nr_file_pages 462723 nr_dirty 20 nr_writeback 0 nr_slab_reclaimable 259333 nr_slab_unreclaimable 33463 nr_page_table_pages 3456 nr_kernel_stack 892 nr_unstable 0 nr_bounce 11 nr_vmscan_write 292032 nr_vmscan_immediate_reclaim 47204474 nr_writeback_temp 0 nr_isolated_anon 0 nr_isolated_file 0 nr_shmem 128 nr_dirtied 69574 nr_written 356299 nr_anon_transparent_hugepages 0 nr_free_cma 7519 nr_swapcache 41972 nr_dirty_threshold 6982 nr_dirty_background_threshold 99297