Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 4 Jun 2002 06:38:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 4 Jun 2002 06:38:32 -0400 Received: from ns.suse.de ([213.95.15.193]:5 "EHLO Cantor.suse.de") by vger.kernel.org with ESMTP id ; Tue, 4 Jun 2002 06:38:31 -0400 To: Linus Torvalds Cc: linux-kernel@vger.kernel.org Subject: Caching files in nfsd was Re: [patch 12/16] fix race between writeback and unlink In-Reply-To: <1023142233.31475.23.camel@tiny.suse.lists.linux.kernel> From: Andi Kleen Date: 04 Jun 2002 12:38:25 +0200 Message-ID: Lines: 24 X-Mailer: Gnus v5.7/Emacs 20.6 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Linus Torvalds writes: > I _think_ that right now nfsd doesn't cache file opens (only inodes), so > this could be a performance issue for nfsd, but it might be possible to > change how nfsd acts. And it would be a _lot_ cleaner to do it at the file > level. Yes. Fixing this would also help XFS (which I hope will be merged in 2.5 as it works very well for a lot of people). It manages its extent preallocation per file and flushes extents on closes. Currently it has to maintain an ugly private nfs reference cache to avoid flushing an extent after every NFS write operation (and killing write performance this way) Also letting nfsd know about the filemap.c readahead window information in struct file (that is what it currently caches in the racache) is really ugly and a kind of layering violation... I guess it is not too uncommon for other file systems too to hold state per open file. -Andi - 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/