• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: HAL overloads and VM
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HAL overloads and VM


  • Subject: Re: HAL overloads and VM
  • From: Herbie Robinson <email@hidden>
  • Date: Wed, 12 Oct 2005 02:38:20 -0400

At 3:11 PM -0700 10/11/05, Ethan Funk wrote:
Just thought I would let everyone on the list know that mlock-ing the audio ring buffers used in my render-callbacks has eliminated all HAL overloads and audio drop outs in my application. It's very solid now... I no longer live in fear of a studer or skip. The only exception is when I plug/unplug power from a laptop. This always causes a HAL overload, due I would expect to the processor changing speeds to save power.

I know Apple's VM engine is supposed to be able to "learn" memory usage trends in an application, but my theory is that the VM engine has no way of knowing or expecting a sequential read through a ring buffer to get ready (page in) blocks of memory back at the beginning of the buffer as the read approaches the end. Just a guess. mlock works regardless of the cause of the VM glitches.

One misconception here: VM systems don't ever anticipate what you are going to use and page it in ahead of time (at least not without being explicitly told to). They figure out what you have been using and avoid paging it out. The fine point of the algorithm is figuring out what memory is still in use.


Your results jive with what the VM gurus I know have told me (not OS X types). They have always claimed that keeping the VM LRU accurate (i.e., resetting the "page read" bits in the MMU on a frequent basis to keep track of how long it's been since a page in memory was used) costs way too much in terms of CPU overhead. Some of them even claim that one gets the best system performance by picking pages to page out at random and not even using the "page read" bits in the MMU.

I have seen a lot of claims that OS X is somehow different in this respect, but none of the claimants have actually pointed me at a viable algorithm (at least not yet)...
--
-*****************************************
** http://www.curbside-recording.com/ **
******************************************
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >HAL overloads and VM (From: Ethan Funk <email@hidden>)

  • Prev by Date: Re: Audio Units - newbie questions
  • Next by Date: RE: Audio Units - newbie questions
  • Previous by thread: HAL overloads and VM
  • Next by thread: Why a crash in Float32ToNative16_Altivec?
  • Index(es):
    • Date
    • Thread