Re: explicit dcache <-> user-space cache coherency, sys_mark_dir_clean(), O_CLEAN

Linus Torvalds
2004-02-20T15:42:59Z

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