diff options
| author | thorpej <thorpej@NetBSD.org> | 1999-07-07 06:02:21 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 1999-07-07 06:02:21 +0000 |
| commit | 4e398a6ded89d7212120224e3a1766ede15d83d6 (patch) | |
| tree | bea82e466dacca2acf02b06a889ba1ce9f380fc3 /sys/dev/raidframe | |
| parent | ad1a5ef5cf7d5d9eb87e8091f1765184e114e70e (diff) | |
Add some more meat to madvise(2):
* Implement MADV_DONTNEED: deactivate pages in the specified range,
semantics similar to Solaris's MADV_DONTNEED.
* Add MADV_FREE: free pages and swap resources associated with the
specified range, causing the range to be reloaded from backing
store (vnodes) or zero-fill (anonymous), semantics like FreeBSD's
MADV_FREE and like Digital UNIX's MADV_DONTNEED (isn't it SO GREAT
that madvise(2) isn't standardized!?)
As part of this, move the non-map-modifying advice handling out of
uvm_map_advise(), and into sys_madvise().
As another part, implement general amap cleaning in uvm_map_clean(), and
change uvm_map_clean() to only push dirty pages to disk if PGO_CLEANIT
is set in its flags (and update sys___msync13() accordingly). XXX Add
a patchable global "amap_clean_works", defaulting to 1, which can disable
the amap cleaning code, just in case problems are unearthed; this gives
a developer/user a quick way to recover and send a bug report (e.g. boot
into DDB and change the value).
XXX Still need to implement a real uao_flush().
XXX Need to update the manual page.
With these changes, rebuilding libc will automatically cause the new
malloc(3) to use MADV_FREE to actually release pages and swap resources
when it decides that can be done.
Diffstat (limited to 'sys/dev/raidframe')
0 files changed, 0 insertions, 0 deletions
