From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752689AbcBEMDP (ORCPT ); Fri, 5 Feb 2016 07:03:15 -0500 Received: from b.mail.tornado.no ([195.159.29.130]:42148 "EHLO mailstore06.sysedata.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750850AbcBEMDN (ORCPT ); Fri, 5 Feb 2016 07:03:13 -0500 X-Greylist: delayed 1103 seconds by postgrey-1.27 at vger.kernel.org; Fri, 05 Feb 2016 07:03:13 EST Subject: Re: [RFC] why the amount of cache from "free -m" and /proc/meminfo are different? To: Xishi Qiu , Linux MM , LKML References: <56B45457.4010702@huawei.com> From: "Daniel K." Message-ID: <56B48B2D.4020502@syse.no> Date: Fri, 5 Feb 2016 11:44:45 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.0.1 MIME-Version: 1.0 In-Reply-To: <56B45457.4010702@huawei.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/05/2016 07:50 AM, Xishi Qiu wrote: > [root@localhost ~]# free -m > total used free shared buff/cache available > Mem: 48295 574 41658 8 6062 46344 > Swap: 24191 0 24191 > > [root@localhost ~]# cat /proc/meminfo > Buffers: 0 kB > Cached: 3727824 kB > Slab: 2480092 kB free and meminfo seems to match up pretty well to me. Are you really asking about display in MB vs kB? Drop the -m switch to free. Also, give 'man free' a spin, it explains what's behind the numbers. Daniel K.