From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [RFC] fuse writable mmap design Date: Thu, 15 Nov 2007 20:42:38 +0100 Message-ID: <1195155759.22457.29.camel@lappy> References: <1195154530.22457.16.camel@lappy> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org To: Miklos Szeredi Return-path: Received: from pentafluge.infradead.org ([213.146.154.40]:43065 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752288AbXKOTnG (ORCPT ); Thu, 15 Nov 2007 14:43:06 -0500 In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, 2007-11-15 at 20:37 +0100, Miklos Szeredi wrote: > > I'm somewhat confused by the complexity. Currently we can already have a > > lot of dirty pages from FUSE (up to the per BDI dirty limit - so > > basically up to the total dirty limit). > > > > How is having them dirty from mmap'ed writes different? > > Nope, fuse never had dirty pages. It does normal writes > synchronously, just updating the cache. > > The dirty accounting and then the per-bdi throttling basically made it > possible _at_all_ to have a chance at a writepage implementation which > is not deadlocky (so thanks for those ;). > > But there's still the throttle_vm_writeout() thing, and the other > places where the kernel is waiting for a write to complete, which just > cannot be done within a constrained time if an unprivileged userspace > process is involved. Ah, ok, your initial story missed this part (not being intimately familiar with FUSE made all that somewhat obscure). The next point then, I'd expect your fuse_page_mkwrite() to push writeout of your 32-odd mmap pages instead of poll.