Nick Piggin <nickpiggin@xxxxxxxxxxxx> wrote: > > How do you do a write-through cache for shared-writable mmap? > > For shared writable mmap? I don't know... You can't do write-through caching for shared-writable mmap because the writes go directly into the pagecache once the page is made writable, at least, short of instruction emulation. At some point in the future we'll be asked to turf the data back to the server. > does POSIX require mmap data to be coherent with read(2)/write(2)? ;) I suspect so, but I don't know offhand. I want it to be coherent anyway, otherwise it's inconsistent with OpenAFS and Arla (or at least more so). Note also that the choice of write-through or write-back caching also has implications for local on-disk caching of modified data and disconnected operation. > I just mean more generally. simple write(2) writes, for starters. Given that writing through an mmap'd section is write-back by its very nature[*] and so since I have to do write-back anyway, why consider doing write-through too? [*] Unless we want to do instruction emulation or single stepping. Hmmm... I wonder if O_SYNC should use write-through caching. David - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html