Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262310AbUK3VRc (ORCPT ); Tue, 30 Nov 2004 16:17:32 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262311AbUK3VRc (ORCPT ); Tue, 30 Nov 2004 16:17:32 -0500 Received: from rev.193.226.233.139.euroweb.hu ([193.226.233.139]:50048 "EHLO dorka.pomaz.szeredi.hu") by vger.kernel.org with ESMTP id S262310AbUK3VRP (ORCPT ); Tue, 30 Nov 2004 16:17:15 -0500 To: avi@argo.co.il CC: alan@lxorguk.ukuu.org.uk, torvalds@osdl.org, hbryan@us.ibm.com, akpm@osdl.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, pavel@ucw.cz In-reply-to: <41ACD03C.9010300@argo.co.il> (message from Avi Kivity on Tue, 30 Nov 2004 21:55:40 +0200) Subject: Re: [PATCH] [Request for inclusion] Filesystem in Userspace References: <1100798975.6018.26.camel@localhost.localdomain> <41A47B67.6070108@argo.co.il> <41ACBF87.4040206@argo.co.il> <41ACD03C.9010300@argo.co.il> Message-Id: From: Miklos Szeredi Date: Tue, 30 Nov 2004 22:13:27 +0100 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1565 Lines: 39 > you're describing the deadlock here: all memory is full, no process > which allocates memory can make any progress. Yes they, can: the allocation will fail, function will return -ENOMEM, malloc will return NULL, pagefault will fail with OOM. This is progress, though not the best sort. It is most certainly _not_ a deadlock. > This is not a true oom situation: there can be plenty of memory in > dirty pagecache which we could reclaim if we had that tiny bit of > reserve memory. The amount of reserved memory that would be needed depends upon the filesystem. Some filesystems would need only very little to be able to free some memory, some would need a lot (e.g. a bzip2 compressing filesystem). There's no magic solution with reserving memory. And this is not unique to userspace filesystems, as Rik van Riel pointed out earlier, network filesystems are also prone to deadlock: http://lkml.org/lkml/2004/11/27/81 > >I looked at ramfs, it isn't even limited. You can easily crash your > >system just by filling it up with data, but no deadlock will happen. > > > > > Right. But ramfs doesn't call a userspace process which calls the kernel > right back. Doesn't matter one little whit. The end result is the same: Out Of Memory, which is _not_ equivalent to deadlock. Please think it over. Miklos - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/