Re: Reload VM hint?
Re: Reload VM hint?
- Subject: Re: Reload VM hint?
- From: Quinn <email@hidden>
- Date: Thu, 31 May 2007 10:17:17 +0100
At 14:53 -0700 30/5/07, James Bucanek wrote:
Michael Smith <mailto:email@hidden> wrote (Wednesday, May 30, 2007
12:36 PM -0700):
As a backup utility, you are probably reading a lot of files; as Brian
notes if you apply the F_NOCACHE fcntl to these files immediately
after opening them, you will avoid evicting other applications' pages
in favour of file cache pages.
I hadn't thought of that, and that's an excellent suggestion (thanks
also extended to Brian and Matt).
If you do the F_NOCACHE thing, try to meet the following criteria:
o page align your memory buffers <x-man-page://3/valloc>
o make them an even multiple of the page size <x-man-page://3/getpagesize>
o read at an offset into the file that's an even multiple of the page size
o read an even multiple of a page size bytes (except at the end, of course)
By doing all of the above, you increase the effectiveness of
F_NOCACHE (that is, your minimise the amount of caching).
Share and Enjoy
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden