From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anton Altaparmakov Subject: Re: [PATCH] [Request for inclusion] Filesystem in Userspace Date: Sun, 21 Nov 2004 11:53:04 +0000 (GMT) Message-ID: References: <20041117190055.GC6952@openzaurus.ucw.cz> <20041117204424.GC11439@elf.ucw.cz> <20041118144634.GA7922@openzaurus.ucw.cz> <20041121095038.GV2870@vagabond> <20041121103956.GW2870@vagabond> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: bulb@ucw.cz, pavel@ucw.cz, akpm@osdl.org, torvalds@osdl.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Return-path: Received: from ppsw-3.csi.cam.ac.uk ([131.111.8.133]:28050 "EHLO ppsw-3.csi.cam.ac.uk") by vger.kernel.org with ESMTP id S263222AbUKULxL (ORCPT ); Sun, 21 Nov 2004 06:53:11 -0500 To: Miklos Szeredi In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Sun, 21 Nov 2004, Miklos Szeredi wrote: > OK, I see your point. But can't the memory subsystem be tought, that > those pages are not guaranteed to be written back in a limited time? It already is. Your address space ->writepage can do redirty_page_for_writepage(wbc, page); unlock_page(page); return 0; And that is fine. NTFS does this. As does Reiserfs I believe. For NTFS I do it exactly when I get to -ENOMEM so that I don't have enough memory to coplete the writepage so I abort the write and redirty the page so it gets tried again at a later time when more memory is freed. The writeback control (wbc) ensures the VM doesn't just keep calling us trying to clean the page to free it. It knows it is pointless so it gives up. The OOM killer can then kill some other app which will free memory, and then the writepage will be retried and it will succeed. Now I know the fuse fs can be swapped out but why that would lead to a deadlock I can't see. There always is something else to kill to free memory so the fs can be swapped back in. And if the fs is killed surely all its pages will be invalidated and thrown away by fuse, no? Best regards, Anton -- Anton Altaparmakov (replace at with @) Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/