Re: First set of OSDL Shared Mem scalability results, some wierdness ...
Sean Chittenden <sean@chittenden.org>
From: Sean Chittenden <sean@chittenden.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Kevin Brown <kevin@sysexperts.com>, pgsql-performance@postgresql.org
Date: 2004-10-15T20:16:27Z
Lists: pgsql-hackers, pgsql-performance
> this. The SUS text is a bit weaselly ("the application must ensure
> correct synchronization") but the HPUX mmap man page, among others,
> lays it on the line:
>
> It is also unspecified whether write references to a memory region
> mapped with MAP_SHARED are visible to processes reading the file
> and
> whether writes to a file are visible to processes that have
> mapped the
> modified portion of that file, except for the effect of msync().
>
> It might work on particular OSes but I think depending on such behavior
> would be folly...
Agreed. Only OSes with a coherent file system buffer cache should ever
use mmap(2). In order for this to work on HPUX, msync(2) would need to
be used. -sc
--
Sean Chittenden