Bug 13618 - MAP_NOSYNC for mmap()
Summary: MAP_NOSYNC for mmap()
Status: RESOLVED INVALID
Alias: None
Product: Memory Management
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Andrew Morton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-25 07:53 UTC by Markus Doppelbauer
Modified: 2015-02-19 15:31 UTC (History)
3 users (show)

See Also:
Kernel Version: any
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Testcase (6.55 KB, text/plain)
2009-06-26 18:09 UTC, Markus Doppelbauer
Details

Description Markus Doppelbauer 2009-06-25 07:53:38 UTC
Hello,

This is not a bug, but a feature/enhancement request.

Many databases (e.g. BDB) use "mmap()" to create a
memory cache.
The problem: the modified cache is constantly written
to mmaped-file on the harddisk.

On *BSD you simply use the flag MAP_NOSYNC for "mmap()".
The *BSD manpage:
NOSYNC: Causes data dirtied via this VM map to be flushed to
physical media only when necessary (usually by the pager)
rather then gratuitously.  Typically this prevents the update
daemons from flushing pages dirtied through such maps and thus
allows efficient sharing of memory across unassociated processes
using a file-backed shared memory map.

Maybe this would be also a great idea for linux?

Thanks
Marcus
Comment 1 Markus Doppelbauer 2009-06-26 18:09:04 UTC
Created attachment 22107 [details]
Testcase
Comment 2 xerofoify 2014-06-24 17:00:01 UTC
This is not a bug, please  close this bug log.
Cheers Nick

Note You need to log in before you can comment on or make changes to this bug.