Re: statfs() / statvfs() syscall ballsup...

From: Trond Myklebust
Date: Fri Oct 10 2003 - 22:49:00 EST


>>>>> " " == Andrew Morton <akpm@xxxxxxxx> writes:

> POSIX does not define the fadvise() semantics very clearly, so
> it is largely up to us to decide what makes sense. There are a
> number of things which we can do quite easily in there - it's
> mainly a matter of working out exactly what we want to do.

Possibly, but there really is no need to get over-creative either. The
SUS definition of msync(MS_INVALIDATE) reads as follows:

When MS_INVALIDATE is specified, msync() shall invalidate all
cached copies of mapped data that are inconsistent with the
permanent storage locations such that subsequent references
shall obtain data that was consistent with the permanent
storage locations sometime between the call to msync() and the
first subsequent memory reference to the data.

(ref: http://www.opengroup.org/onlinepubs/007904975/functions/msync.html)

i.e. a strict implementation would mean that msync() will in fact act
as a synchronization point that is fully consistent with Linus'
proposal for a "this region is stale" function.

Unfortunately Linux appears incapable of implementing such a strict
definition of msync() as it stands.

Cheers,
Trond
-
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/