Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753889Ab1BUIaF (ORCPT ); Mon, 21 Feb 2011 03:30:05 -0500 Received: from zene.cmpxchg.org ([85.214.230.12]:59771 "EHLO zene.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752189Ab1BUIaE (ORCPT ); Mon, 21 Feb 2011 03:30:04 -0500 Date: Mon, 21 Feb 2011 09:29:52 +0100 From: Johannes Weiner To: Minchan Kim Cc: Andrew Morton , linux-mm , LKML , Steven Barrett , Ben Gamari , Peter Zijlstra , Rik van Riel , Mel Gorman , KOSAKI Motohiro , Wu Fengguang , Nick Piggin , Andrea Arcangeli , Balbir Singh , KAMEZAWA Hiroyuki Subject: Re: [PATCH v6 1/3] deactivate invalidated pages Message-ID: <20110221082952.GB25382@cmpxchg.org> References: <5b1eeca414d39e77afdb9684eab36addd11520a1.1298212517.git.minchan.kim@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5b1eeca414d39e77afdb9684eab36addd11520a1.1298212517.git.minchan.kim@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2256 Lines: 49 On Sun, Feb 20, 2011 at 11:43:36PM +0900, Minchan Kim wrote: > Recently, there are reported problem about thrashing. > (http://marc.info/?l=rsync&m=128885034930933&w=2) > It happens by backup workloads(ex, nightly rsync). > That's because the workload makes just use-once pages > and touches pages twice. It promotes the page into > active list so that it results in working set page eviction. > > Some app developer want to support POSIX_FADV_NOREUSE. > But other OSes don't support it, either. > (http://marc.info/?l=linux-mm&m=128928979512086&w=2) > > By other approach, app developers use POSIX_FADV_DONTNEED. > But it has a problem. If kernel meets page is writing > during invalidate_mapping_pages, it can't work. > It makes for application programmer to use it since they always > have to sync data before calling fadivse(..POSIX_FADV_DONTNEED) to > make sure the pages could be discardable. At last, they can't use > deferred write of kernel so that they could see performance loss. > (http://insights.oetiker.ch/linux/fadvise.html) > > In fact, invalidation is very big hint to reclaimer. > It means we don't use the page any more. So let's move > the writing page into inactive list's head if we can't truncate > it right now. > > Why I move page to head of lru on this patch, Dirty/Writeback page > would be flushed sooner or later. It can prevent writeout of pageout > which is less effective than flusher's writeout. > > Originally, I reused lru_demote of Peter with some change so added > his Signed-off-by. > > Reported-by: Ben Gamari > Signed-off-by: Peter Zijlstra > Acked-by: Rik van Riel > Acked-by: Mel Gorman > Reviewed-by: KOSAKI Motohiro > Cc: Wu Fengguang > Cc: Johannes Weiner > Cc: Nick Piggin > Signed-off-by: Minchan Kim Reviewed-by: Johannes Weiner -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/