Re: 10.6.2 issues with F_NOCACHE?
Re: 10.6.2 issues with F_NOCACHE?
- Subject: Re: 10.6.2 issues with F_NOCACHE?
- From: Chris Sarcone <email@hidden>
- Date: Mon, 8 Feb 2010 11:46:51 -0800
Marc --
A small snippet of fs_usage trace is not enough to conclude what entity is caching data. However, given our knowledge of ProApps workloads and how the system behaves when using apps like Final Cut Pro, I think the burden of proof lies on the developer to isolate their own code and see if it's causing the issue.
Within this code you seem to be allocating memory and freeing it, and copying data which was directly DMA'd into it to application supplied buffers. Both of those are not going to be very efficient for any sort of rich media application.
You really want to have a preallocated pool of buffers for use so you aren't constantly calling valloc()/free(). In addition, I'm not sure from the code snippet provided why you can't just read directly into the buffer passed into the Read() method. That would be the most efficient way to do a read with minimal copying. That is the point of direct I/O, right?
Finally, I believe the fcntl for F_RDAHEAD is redundant. I believe F_NOCACHE implies the system will only issue physical I/Os for the supplied buffer.
Thanks,
-- Chris
------------------
6 Infinite Loop
M/S 306-2MS
Cupertino CA 95014
phone: (408) 974-4033
fax: (408) 862-7577
email: email@hidden
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden