From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261162AbUBTPm7 (ORCPT ); Fri, 20 Feb 2004 10:42:59 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261297AbUBTPlZ (ORCPT ); Fri, 20 Feb 2004 10:41:25 -0500 Received: from fw.osdl.org ([65.172.181.6]:43654 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S261295AbUBTPgU (ORCPT ); Fri, 20 Feb 2004 10:36:20 -0500 Date: Fri, 20 Feb 2004 07:41:03 -0800 (PST) From: Linus Torvalds To: Ingo Molnar cc: Tridge , Al Viro , Jamie Lokier , "H. Peter Anvin" , Kernel Mailing List Subject: Re: explicit dcache <-> user-space cache coherency, sys_mark_dir_clean(), O_CLEAN In-Reply-To: <20040220120417.GA4010@elte.hu> Message-ID: References: <16435.60448.70856.791580@samba.org> <16435.61622.732939.135127@samba.org> <20040219081027.GB4113@mail.shareable.org> <20040219163838.GC2308@mail.shareable.org> <20040219182948.GA3414@mail.shareable.org> <20040220120417.GA4010@elte.hu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 20 Feb 2004, Ingo Molnar wrote: > > One 'user-space cache is valid/clean' bit should be enough - where all > non-Samba accesses clear the 'valid bit', and Samba sets the bit > manually. Yes, that, together with O_CLEAN would work. The problem is that you'd still need other system calls: it's not like open(O_CREAT) is the only way to create a file. So you'd have to add versions of "link()" etc, which means that O_CLEAN is really pretty pointless, and you might as well just do it in a new system call. Your version is also not multi-threaded: you can never allow more than one thread doing the "sys_mark_dir_clean()". That was the reason for having two bits: so that anybody can do a lookup in parallell, and only the "filldir" part needs to be serialized. So I do believe you'd want two bits anyway. Linus