Yeah, I aware what you're talking about.
In fact most kernels has common/shared page-cache (since it is just
reasonable and useful), so therefore such hack is works.
Nevertheless it would be great to make msync(MS_INVALIDATE) work for
this case, i.e. for read-only mmaps from the fd-writer side.

чт, 14 нояб. 2019 г. в 18:02, Janne Johansson <[email protected]>:
>
> I'm aware that many/most OSes do sync it, but
>
> Den tors 14 nov. 2019 kl 15:08 skrev Леонид Юрьев <[email protected]>:
>>
>> Thank you for the clarification.
>> "It's Not a Bug, It's a Feature" ;)
>
> Something like that.
> It is one of those things that could be neat if it was, but seemingly 
> non-trivial to make happen, and there is no promise anywhere that any and all 
> kinds of accesses to some data is synched for you, even if most other OSes 
> does that for you nowadays.
>
>>> That is how OpenBSD works, you have to decide if you want to talk mmap() or 
>>> via file descriptor, not both at the same time.

Reply via email to