Revision 1210245
Go back to digest for 2nd January 2011Optimization in KDE Base
Use msync before unmapping KSharedDataCache.
Specifically, use msync before unmapping a KSDC that actually was mapped at some point
before. Although my idea for KSharedDataCache has always been more towards a
cross-process shared memory store that just happened to store to disk (and therefore I
didn't really focus heavily on ensuring consistency of the data sitting on the disk as
long as the data in memory was accurate), it doesn't hurt to periodically have the OS
write out modified pages to the underlying file.
I will note that this shouldn't be a correctness change since the *only* form of I/O to
the underlying file is through the mmap(). Also, msync should only push out pages of
memory that were actually modified, which is why I simply sync the entire mapped block.
File Changes
- /trunk/KDE/kdelibs/kdecore/util
- /kshareddatacache.cpp
- /kshareddatacache_p.h