Hallvard Breien Furuseth wrote:
On 02/08/14 22:31, Howard Chu wrote:
Note that this is invalidating
an on-chip data cache which is typically only 32KB or so. It has nothing
to do with flushing the buffer cache. ("flush" is a misnomer, but that's
what the syscall is called.)
OK, but apparently it's still a cache which can include
data from both metapages and datapages.
The thing is, it will only include *old* data from the meta pages or
data pages. Because nothing that was updated by write() will be visible
to the chip (thru the mmap) until the on-chip data cache is invalidated.
And all of that old data will be self-consistent because until the
metapage update is visible, nobody will go looking for any of the new
datapages.