From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wanpeng Li Subject: Re: [PATCH v2 02/28] vmscan: take at least one pass with shrinkers Date: Thu, 11 Apr 2013 15:27:30 +0800 Message-ID: <19056.1182135299$1365665273@news.gmane.org> References: <20130408090131.GB21654@lge.com> <51628877.5000701@parallels.com> <20130409005547.GC21654@lge.com> <20130409012931.GE17758@dastard> <20130409020505.GA4218@lge.com> <20130409123008.GM17758@dastard> <20130410025115.GA5872@lge.com> <20130410100752.GA10481@dastard> <20130411004114.GC10481@dastard> Reply-To: Wanpeng Li Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20130411004114.GC10481@dastard> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Dave Chinner Cc: Theodore Ts'o , JoonSoo Kim , containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, hughd-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, Michal Hocko , Linux Memory Management List , Johannes Weiner , linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andrew Morton , Wanpeng Li , Al Viro List-Id: linux-mm.kvack.org On Thu, Apr 11, 2013 at 10:41:14AM +1000, Dave Chinner wrote: >On Wed, Apr 10, 2013 at 11:03:39PM +0900, JoonSoo Kim wrote: >> Another one what I found is that they don't account "nr_reclaimed" precisely. >> There is no code which check whether "current->reclaim_state" exist or not, >> except prune_inode(). > >That's because prune_inode() can free page cache pages when the >inode mapping is invalidated. Hence it accounts this in addition >to the slab objects being freed. > >IOWs, if you have a shrinker that frees pages from the page cache, >you need to do this. Last time I checked, only inode cache reclaim >caused extra page cache reclaim to occur, so most (all?) other >shrinkers do not need to do this. > If we should account "nr_reclaimed" against huge zero page? There are large number(512) of pages reclaimed which can throttle direct or kswapd relcaim to avoid reclaim excess pages. I can do this work if you think the idea is needed. Regards, Wanpeng Li >It's just another wart that we need to clean up.... > >Cheers, > >Dave. >-- >Dave Chinner >david-FqsqvQoI3Ljby3iVrkZq2A@public.gmane.org