Mailing List Archive

Doubt on mmap file backend
We are trying to map the file and content is written in to specific offset.
In meanwhile, if try to access the mmap'd content at specified offset, we
are getting NULL value. we have not called msync() yet. the mmap called
with MAP_SHARED.
Is it possible that mmap content can differ on read after write or is this
the problem happening because read is called before the msync().Sorry ,it
is very generic question ..Wanted to know if any idea on the behavior.

Thanks,
Prem
Re: Doubt on mmap file backend [ In reply to ]
--------
In message <CAC3PTxJqHqzH_9dsN8Q7jhLOonVc7CGQRscwwP86hDHGykj97w@mail.gmail.com>, Prem Kumar writes:

>Is it possible that mmap content can differ on read after write or is this
>the problem happening because read is called before the msync().Sorry ,it
>is very generic question ..Wanted to know if any idea on the behavior.

If you mean "read by another process", then yes. Only kernels with
integrated VM/buffers provide consistency without msync.

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc