Re: Mixing cached and not_cached access to the same file
Re: Mixing cached and not_cached access to the same file
- Subject: Re: Mixing cached and not_cached access to the same file
- From: "Quinn \"The Eskimo!\"" <email@hidden>
- Date: Mon, 22 Oct 2012 11:52:48 +0100
On 15 Oct 2012, at 20:38, James Bucanek <email@hidden> wrote:
> I can immediately imagine two ways of accomplishing this, but I don't know which would be better (or preferable).
I think option #2 is likely to be better, although the entire technique seems kinda suspect to me. The small reads will end up putting blocks of data from the file into the UBC. At that point large reads and writes will be have to broken up by the cluster layer, with some chunks coming from the disk and some chunks coming from the UBC. That doesn't strike me as particularly efficient. You might be better off using non-cached I/O for everything and then having your own user space cache to assist with the random access. I suspect that your app-specific knowledge will let you tune your cache to work better than UBC. The only thing you have to watch out for is cache coherency.
Of course the above is all speculation; I'd recommend some testing to gather hard evidence.
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.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden