From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966484Ab3E2TyH (ORCPT ); Wed, 29 May 2013 15:54:07 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:49874 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759631Ab3E2Tx6 (ORCPT ); Wed, 29 May 2013 15:53:58 -0400 Date: Wed, 29 May 2013 12:53:56 -0700 From: Andrew Morton To: Mel Gorman Cc: Jiri Slaby , Valdis Kletnieks , Rik van Riel , Zlatko Calusic , Johannes Weiner , dormando , Michal Hocko , Jan Kara , Dave Chinner , Kamezawa Hiroyuki , Linux-FSDevel , Linux-MM , LKML Subject: Re: [PATCH 4/4] mm: vmscan: Take page buffers dirty and locked state into account Message-Id: <20130529125356.5018cb1ba28959664be67791@linux-foundation.org> In-Reply-To: <1369659778-6772-5-git-send-email-mgorman@suse.de> References: <1369659778-6772-1-git-send-email-mgorman@suse.de> <1369659778-6772-5-git-send-email-mgorman@suse.de> X-Mailer: Sylpheed 3.2.0beta5 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 27 May 2013 14:02:58 +0100 Mel Gorman wrote: > Page reclaim keeps track of dirty and under writeback pages and uses it to > determine if wait_iff_congested() should stall or if kswapd should begin > writing back pages. This fails to account for buffer pages that can be under > writeback but not PageWriteback which is the case for filesystems like ext3 > ordered mode. Furthermore, PageDirty buffer pages can have all the buffers > clean and writepage does no IO so it should not be accounted as congested. iirc, the PageDirty-all-buffers-clean state is pretty rare. It might not be worth bothering about? > This patch adds an address_space operation that filesystems may > optionally use to check if a page is really dirty or really under > writeback. address_space_operations methods are Documented in Documentation/filesystems/vfs.txt ;) > An implementation is provided for for buffer_heads is added > and used for block operations and ext3 in ordered mode. By default the > page flags are obeyed. > > Credit goes to Jan Kara for identifying that the page flags alone are > not sufficient for ext3 and sanity checking a number of ideas on how > the problem could be addressed.