RE: Memory mapped files question

Perez-Gonzalez, Inaky (inaky.perez-gonzalez@intel.com)
Mon, 14 Apr 2003 12:50:33 -0700


> From: Bryan Shumsky [mailto:bzs@via.com]
>
> Hi, everyone. Thanks for all your responses. Our confusion is that in
Unix
> environments, when we modify memory in memory-mapped files the underlying
> system flusher manages to flush the files for us before the files are
> munmap'ed or msysnc'ed.
>
> Rewriting all of our code to manually handle the flushing is a MAJOR
> undertaking, so I was hoping there might be some sneaky solution you could
> come up with. Any ideas?

Have a high prio thread msync()ing every now and then? OOps forget it,
I never said that, it is really a lame solution :) you can run in all
kinds of trouble.

Or maybe it is not that lame if you know *exactly* when do you need
the flush (for example, some other program is going to access the data);
this way you can signal the process who did the modification for it
to issue an msync(). However, this is going to be some delicate
synchronization
between the two apps.

Iñaky Pérez-González -- Not speaking for Intel -- all opinions are my own
(and my fault)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/