From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753915AbcBPHOX (ORCPT ); Tue, 16 Feb 2016 02:14:23 -0500 Received: from rcdn-iport-3.cisco.com ([173.37.86.74]:19448 "EHLO rcdn-iport-3.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753638AbcBPHOV (ORCPT ); Tue, 16 Feb 2016 02:14:21 -0500 X-IronPort-AV: E=Sophos;i="5.22,454,1449532800"; d="scan'208";a="77159473" Date: Mon, 15 Feb 2016 23:14:13 -0800 (PST) From: Nag Avadhanam To: Dave Chinner cc: "Theodore Ts'o" , "Daniel Walker (danielwa)" , Alexander Viro , "Khalid Mughal (khalidm)" , "xe-kernel@external.cisco.com" , "dave.hansen@intel.com" , "hannes@cmpxchg.org" , "riel@redhat.com" , Jonathan Corbet , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: [PATCH] kernel: fs: drop_caches: add dds drop_caches_count In-Reply-To: <20160216053827.GX19486@dastard> Message-ID: References: <1455308080-27238-1-git-send-email-danielwa@cisco.com> <20160214211856.GT19486@dastard> <56C216CA.7000703@cisco.com> <20160215230511.GU19486@dastard> <56C264BF.3090100@cisco.com> <20160216004531.GA28260@thunk.org> <20160216053827.GX19486@dastard> User-Agent: Alpine 2.00 (LRH 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Auto-Response-Suppress: DR, OOF, AutoReply Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 15 Feb 2016, Dave Chinner wrote: > On Tue, Feb 16, 2016 at 02:58:04AM +0000, Nag Avadhanam (nag) wrote: >> Its the calculation of the # of bytes of non-reclaimable file system cache >> pages that has been troubling us. We do not want to count inactive file >> pages (of programs/binaries) that were once mapped by any process in the >> system as reclaimable because that might lead to thrashing under memory >> pressure (we want to alert admins before system starts dropping text >> pages). > > The code presented does not match your requirements. It only counts > pages that are currently mapped into ptes. hence it will tell you > that once-used and now unmapped binary pages are reclaimable, and > drop caches will reclaim them. hence they'll need to be fetched from > disk again if they are faulted in again after a drop_caches run. Will the inactive binary pages be automatically unmapped even if the process into whose address space they are mapped is still around? I thought they are left mapped until such time there is memory pressure. We only care for binary pages (active and inactive) mapped into the address spaces of live processes. Its okay to aggressively reclaim inactive pages once mapped into processes that are no longer around. thanks, nag > > Cheers, > > Dave. > -- > Dave Chinner > david@fromorbit.com > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 15 Feb 2016 23:14:13 -0800 (PST) From: Nag Avadhanam To: Dave Chinner cc: "Theodore Ts'o" , "Daniel Walker (danielwa)" , Alexander Viro , "Khalid Mughal (khalidm)" , "xe-kernel@external.cisco.com" , "dave.hansen@intel.com" , "hannes@cmpxchg.org" , "riel@redhat.com" , Jonathan Corbet , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: [PATCH] kernel: fs: drop_caches: add dds drop_caches_count In-Reply-To: <20160216053827.GX19486@dastard> Message-ID: References: <1455308080-27238-1-git-send-email-danielwa@cisco.com> <20160214211856.GT19486@dastard> <56C216CA.7000703@cisco.com> <20160215230511.GU19486@dastard> <56C264BF.3090100@cisco.com> <20160216004531.GA28260@thunk.org> <20160216053827.GX19486@dastard> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Sender: owner-linux-mm@kvack.org List-ID: On Mon, 15 Feb 2016, Dave Chinner wrote: > On Tue, Feb 16, 2016 at 02:58:04AM +0000, Nag Avadhanam (nag) wrote: >> Its the calculation of the # of bytes of non-reclaimable file system cache >> pages that has been troubling us. We do not want to count inactive file >> pages (of programs/binaries) that were once mapped by any process in the >> system as reclaimable because that might lead to thrashing under memory >> pressure (we want to alert admins before system starts dropping text >> pages). > > The code presented does not match your requirements. It only counts > pages that are currently mapped into ptes. hence it will tell you > that once-used and now unmapped binary pages are reclaimable, and > drop caches will reclaim them. hence they'll need to be fetched from > disk again if they are faulted in again after a drop_caches run. Will the inactive binary pages be automatically unmapped even if the process into whose address space they are mapped is still around? I thought they are left mapped until such time there is memory pressure. We only care for binary pages (active and inactive) mapped into the address spaces of live processes. Its okay to aggressively reclaim inactive pages once mapped into processes that are no longer around. thanks, nag > > Cheers, > > Dave. > -- > Dave Chinner > david@fromorbit.com > -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org