From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757670Ab0KRNhS (ORCPT ); Thu, 18 Nov 2010 08:37:18 -0500 Received: from bombadil.infradead.org ([18.85.46.34]:46413 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752190Ab0KRNhQ (ORCPT ); Thu, 18 Nov 2010 08:37:16 -0500 Date: Thu, 18 Nov 2010 08:37:02 -0500 From: Christoph Hellwig To: Dave Chinner Cc: Michel Lespinasse , Peter Zijlstra , Nick Piggin , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Hugh Dickins , Rik van Riel , Kosaki Motohiro , Theodore Tso , Michael Rubin , Suleiman Souhlal Subject: Re: [PATCH 3/3] mlock: avoid dirtying pages and triggering writeback Message-ID: <20101118133702.GA18834@infradead.org> References: <1289996638-21439-1-git-send-email-walken@google.com> <1289996638-21439-4-git-send-email-walken@google.com> <20101117125756.GA5576@amd> <1290007734.2109.941.camel@laptop> <20101117231143.GQ22876@dastard> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101117231143.GQ22876@dastard> User-Agent: Mutt/1.5.21 (2010-09-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 18, 2010 at 10:11:43AM +1100, Dave Chinner wrote: > Hence I think that avoiding ->page_mkwrite callouts is likely to > break some filesystems in subtle, undetected ways. IMO, regardless > of what is done, it would be really good to start by writing a new > regression test to exercise and encode the expected the mlock > behaviour so we can detect regressions later on.... I think it would help if we could drink a bit of the test driven design coolaid here. Michel, can you write some testcases where pages on a shared mapping are mlocked, then dirtied and then munlocked, and then written out using msync/fsync. Anything that fails this test on btrfs/ext4/gfs/xfs/etc obviously doesn't work. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail172.messagelabs.com (mail172.messagelabs.com [216.82.254.3]) by kanga.kvack.org (Postfix) with ESMTP id 2DB0B6B004A for ; Thu, 18 Nov 2010 08:37:17 -0500 (EST) Date: Thu, 18 Nov 2010 08:37:02 -0500 From: Christoph Hellwig Subject: Re: [PATCH 3/3] mlock: avoid dirtying pages and triggering writeback Message-ID: <20101118133702.GA18834@infradead.org> References: <1289996638-21439-1-git-send-email-walken@google.com> <1289996638-21439-4-git-send-email-walken@google.com> <20101117125756.GA5576@amd> <1290007734.2109.941.camel@laptop> <20101117231143.GQ22876@dastard> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101117231143.GQ22876@dastard> Sender: owner-linux-mm@kvack.org To: Dave Chinner Cc: Michel Lespinasse , Peter Zijlstra , Nick Piggin , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Hugh Dickins , Rik van Riel , Kosaki Motohiro , Theodore Tso , Michael Rubin , Suleiman Souhlal List-ID: On Thu, Nov 18, 2010 at 10:11:43AM +1100, Dave Chinner wrote: > Hence I think that avoiding ->page_mkwrite callouts is likely to > break some filesystems in subtle, undetected ways. IMO, regardless > of what is done, it would be really good to start by writing a new > regression test to exercise and encode the expected the mlock > behaviour so we can detect regressions later on.... I think it would help if we could drink a bit of the test driven design coolaid here. Michel, can you write some testcases where pages on a shared mapping are mlocked, then dirtied and then munlocked, and then written out using msync/fsync. Anything that fails this test on btrfs/ext4/gfs/xfs/etc obviously doesn't work. -- 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/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: email@kvack.org