Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange behaviour of mmap() in OS X



On Monday, Jun 23, 2003, at 06:52 Australia/Sydney, Jim Magee wrote:

On Sunday, June 22, 2003, at 4:36 AM, Marcel Weiher wrote:
Any pageout algorithm that automatically punishes mapped file pages (simply because they don't have to be cleaned before recycling in many cases) is inherently unfare.

You seem to be making the assumption here that "fairness" is an inherent good. I feel no inherent moral imperative for treating memory pages fairly. I do see an inherent *practical* requirement for a VM system to be stable and predictable without catastrophic failures.

Sorry, I didn't mean to make any moral judgments. I simply stated the page replacement policy. Which is, except where otherwise directed, a global LRU algorithm. For the most part, this works quite well. It also has the benefit of being quite predictable. Where it isn't desired, there are simple ways around it (as I pointed out with msync(), and the no-cache fcntl() options).

Ah! So it is a global LRU policy. I've read enough of the xnu source to
believe it couldn't be anything else, but still doubted myself to be not
positive. Hypothetically, are there are plans to add user-space tuneable page-type limits on usage? As in "vmtune" for AIX, the old
"priority_paging" for Solaris, the various NetBSD vm.* sysctls:

vm.anonmin
vm.execmin
vm.filemin
vm.anonmax
vm.execmax
vm.filemax

IMHO, this is needed in the server space, I've seen too many 8 GB RAM
systems thrash to death. Although, looking at xnu, it does look like a lot
of work!

Cheers,
--
Paul Ripke
Unix/OpenVMS/TSM/DBA
101 reasons why you can't find your Sysadmin:
68: It's 9AM. He/She is not working that late.
-- Koos van den Hout
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Strange behaviour of mmap() in OS X (From: Jim Magee <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.