From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756008Ab0K3BBk (ORCPT ); Mon, 29 Nov 2010 20:01:40 -0500 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:57700 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754391Ab0K3BBj (ORCPT ); Mon, 29 Nov 2010 20:01:39 -0500 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 From: KOSAKI Motohiro To: Minchan Kim Subject: Re: [PATCH v3 1/3] deactivate invalidated pages Cc: kosaki.motohiro@jp.fujitsu.com, Andrew Morton , linux-mm , LKML , Ben Gamari , Peter Zijlstra , Wu Fengguang , Johannes Weiner , Nick Piggin , Mel Gorman In-Reply-To: <6e01d81a4b575dcaaacc6b3782c505103e024085.1291043274.git.minchan.kim@gmail.com> References: <6e01d81a4b575dcaaacc6b3782c505103e024085.1291043274.git.minchan.kim@gmail.com> Message-Id: <20101130100134.82E3.A69D9226@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.50.07 [ja] Date: Tue, 30 Nov 2010 10:01:35 +0900 (JST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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 is very hard for application programmer to use it. > Because 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. > > Why I need the page to head, 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: Minchan Kim > Signed-off-by: Peter Zijlstra > Acked-by: Rik van Riel > Cc: Wu Fengguang > Cc: KOSAKI Motohiro > Cc: Johannes Weiner > Cc: Nick Piggin > Cc: Mel Gorman Reviewed-by: KOSAKI Motohiro