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

From: Linus Torvalds
Date: Fri Feb 20 2004 - 10:50:00 EST




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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/