From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932370AbXBTIy4 (ORCPT ); Tue, 20 Feb 2007 03:54:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932693AbXBTIy4 (ORCPT ); Tue, 20 Feb 2007 03:54:56 -0500 Received: from mail-gw2.sa.eol.hu ([212.108.200.109]:47804 "EHLO mail-gw2.sa.eol.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932370AbXBTIyz (ORCPT ); Tue, 20 Feb 2007 03:54:55 -0500 To: chris.mason@oracle.com CC: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org In-reply-to: <20070220001620.GK6133@think.oraclecorp.com> (message from Chris Mason on Mon, 19 Feb 2007 19:16:20 -0500) Subject: Re: dirty balancing deadlock References: <20070218125307.4103c04a.akpm@linux-foundation.org> <20070218145929.547c21c7.akpm@linux-foundation.org> <20070218155916.0d3c73a9.akpm@linux-foundation.org> <20070219004537.GB9289@think.oraclecorp.com> <20070219010102.GC9289@think.oraclecorp.com> <20070220001620.GK6133@think.oraclecorp.com> Message-Id: From: Miklos Szeredi Date: Tue, 20 Feb 2007 09:53:46 +0100 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org > > > > > In general, writepage is supposed to do work without blocking on > > > > > expensive locks that will get pdflush and dirty reclaim stuck in this > > > > > fashion. You'll probably have to take the same approach reiserfs does > > > > > in data=journal mode, which is leaving the page dirty if fuse_get_req_wp > > > > > is going to block without making progress. > > > > > > > > Pdflush, and dirty reclaim set wbc->nonblocking to true. > > > > balance_dirty_pages and fsync don't. The problem here is that > > > > Andrew's patch is wrong to let balance_dirty_pages() try to write back > > > > pages from a different queue. > > > > > > async or sync, writepage is supposed to either make progress or bail. > > > loopback aside, if the fuse call is blocking long term, you're going to > > > run into problems. > > > > Hmm, like what? > > Something a little different from what you're seeing. Basically if the > PF_MEMALLOC paths end up waiting on a filesystem transaction, and that > transaction is waiting for more ram, the system will eventually grind to > a halt. data=journal is the easiest way to hit it, since writepage > always logs at least 4k. > > WB_SYNC_NONE and wbc->nonblocking aren't a great test, in reiser I > resorted to testing PF_MEMALLOC. I'm not pretending to understand how journaling filesystems work, but this shouldn't be an issue with fuse. Can you show me a call path, where PF_MEMALLOC is set and .nonblocking is not? Thanks, Miklos From mboxrd@z Thu Jan 1 00:00:00 1970 In-reply-to: <20070220001620.GK6133@think.oraclecorp.com> (message from Chris Mason on Mon, 19 Feb 2007 19:16:20 -0500) Subject: Re: dirty balancing deadlock References: <20070218125307.4103c04a.akpm@linux-foundation.org> <20070218145929.547c21c7.akpm@linux-foundation.org> <20070218155916.0d3c73a9.akpm@linux-foundation.org> <20070219004537.GB9289@think.oraclecorp.com> <20070219010102.GC9289@think.oraclecorp.com> <20070220001620.GK6133@think.oraclecorp.com> Message-Id: From: Miklos Szeredi Date: Tue, 20 Feb 2007 09:53:46 +0100 Sender: owner-linux-mm@kvack.org Return-Path: To: chris.mason@oracle.com Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org List-ID: > > > > > In general, writepage is supposed to do work without blocking on > > > > > expensive locks that will get pdflush and dirty reclaim stuck in this > > > > > fashion. You'll probably have to take the same approach reiserfs does > > > > > in data=journal mode, which is leaving the page dirty if fuse_get_req_wp > > > > > is going to block without making progress. > > > > > > > > Pdflush, and dirty reclaim set wbc->nonblocking to true. > > > > balance_dirty_pages and fsync don't. The problem here is that > > > > Andrew's patch is wrong to let balance_dirty_pages() try to write back > > > > pages from a different queue. > > > > > > async or sync, writepage is supposed to either make progress or bail. > > > loopback aside, if the fuse call is blocking long term, you're going to > > > run into problems. > > > > Hmm, like what? > > Something a little different from what you're seeing. Basically if the > PF_MEMALLOC paths end up waiting on a filesystem transaction, and that > transaction is waiting for more ram, the system will eventually grind to > a halt. data=journal is the easiest way to hit it, since writepage > always logs at least 4k. > > WB_SYNC_NONE and wbc->nonblocking aren't a great test, in reiser I > resorted to testing PF_MEMALLOC. I'm not pretending to understand how journaling filesystems work, but this shouldn't be an issue with fuse. Can you show me a call path, where PF_MEMALLOC is set and .nonblocking is not? Thanks, Miklos -- 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/ . Don't email: email@kvack.org