From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933182AbcBPQM3 (ORCPT ); Tue, 16 Feb 2016 11:12:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35722 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932352AbcBPQM0 (ORCPT ); Tue, 16 Feb 2016 11:12:26 -0500 Message-ID: <1455639143.15821.21.camel@redhat.com> Subject: Re: [PATCH] kernel: fs: drop_caches: add dds drop_caches_count From: Rik van Riel To: Dave Chinner , Daniel Walker Cc: Alexander Viro , Khalid Mughal , xe-kernel@external.cisco.com, dave.hansen@intel.com, hannes@cmpxchg.org, Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, "Nag Avadhanam (nag)" Date: Tue, 16 Feb 2016 11:12:23 -0500 In-Reply-To: <20160216052852.GW19486@dastard> References: <1455308080-27238-1-git-send-email-danielwa@cisco.com> <20160214211856.GT19486@dastard> <56C216CA.7000703@cisco.com> <20160215230511.GU19486@dastard> <56C264BF.3090100@cisco.com> <20160216052852.GW19486@dastard> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-YWDzmM/d9uaLkMpyOzLk" Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-YWDzmM/d9uaLkMpyOzLk Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2016-02-16 at 16:28 +1100, Dave Chinner wrote: > On Mon, Feb 15, 2016 at 03:52:31PM -0800, Daniel Walker wrote: > > On 02/15/2016 03:05 PM, Dave Chinner wrote: > > >=C2=A0 > > > As for a replacement, looking at what pages you consider > > > "droppable" > > > is really only file pages that are not under dirty or under > > > writeback. i.e. from /proc/meminfo: > > >=20 > > > Active(file):=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0220128 kB > > > Inactive(file):=C2=A0=C2=A0=C2=A0=C2=A060232 kB > > > Dirty:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A00 kB > > > Writeback:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A00 kB > > >=20 > > > i.e. reclaimable file cache =3D Active + inactive - dirty - > > > writeback. > ..... >=C2=A0 > > As to his other suggestion of estimating the droppable cache, I > > have considered it but found it unusable. The problem is the > > inactive file pages count a whole lot pages more than the > > droppable pages. >=20 > inactive file pages are supposed to be exactly that - inactive. i.e. > the have not been referenced recently, and are unlikely to be dirty. > They should be immediately reclaimable. Inactive file pages can still be mapped by processes. The reason we do not unmap file pages when moving them to the inactive list is that some workloads fill essentially all of memory with mmapped file pages. Given that the inactive list is generally a considerable fraction of file memory, unmapping pages that get deactivated could create a lot of churn and unnecessary page faults for that kind of workload. --=C2=A0 All rights reversed --=-YWDzmM/d9uaLkMpyOzLk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJWw0pnAAoJEM553pKExN6DVLcIAKciv8mUmBSSojyQ7zoraptg cHC5xnP3kcavpvq+uWBQvnQ9XnkKAWUQFj7KfZHTb0ny6QFK1LVoqS9rtLiiVwQQ u7I6V5z6W3ZoJhVzKuvVuIRRDPm34ypoUMCi138WwaP9LQVA4hGpI2x1MzRC3AFq DAsh/Rn4wPLkZ6UK2+EyW1VUxSoURICJXQed15mEUt6Kn/mAlZKv+U68soUVqUT2 /RT/zWlwzUaymkcmCT00DfsP2hZJz0meWm/lCH9nnPxS3sn68vs1nLkmAXg+E7Ib vxYiXt2f6AXTxbuwg+yWX9pL5YzLNexsiEXCamCIzJu6kEhvZje00xPH5xyLkeE= =C8VL -----END PGP SIGNATURE----- --=-YWDzmM/d9uaLkMpyOzLk--