• 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: Overload issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Overload issues


  • Subject: Re: Overload issues
  • From: Doug Wyatt <email@hidden>
  • Date: Mon, 21 Jun 2004 15:40:40 -0700

On Jun 21, 2004, at 15:03, Glenn Maynard wrote:
On Mon, Jun 21, 2004 at 02:15:34PM -0700, Jeff Moore wrote:
when you are measuring times in the IOProc, my guess is that you are
doing it in a way that allows the IO thread to get pre-empted (calling
printf or malloc is a good way to do this). This is why the times seem
to be a little wild. You'd probably get more usable results using a
tool like Shark or Saturn to do your profiling.

The timer uses gettimeofday(); all times are stored in small, global, static
buffers. If there's a better call to use for this type of timing, let
me know.

Someone may jump in and tell us that gettimeofday() is not a problem, but we avoid BSD syscalls on the I/O thread because they can take kernel locks. mach_absolute_time() is safe. See CAHostTimeBase in PublicUtility for a nice wrapper (or usage examples).

This problem only happens on user machines; none of us have access to a
machine to reproduce it (or it would be an order of magnitude easier to fix).

*sigh*

I don't see how this could be the problem, though; the issue is being
reported on a system with four times as much memory as my Linux machines,
workstation, which almost never underruns with 1/4 the buffer size.

Even if you can't reproduce the overloads, please do see if you can find any page faults on your I/O thread; they may be happening on your system and not causing overloads. I may be clutching at a straw, but it is a good thing to rule out. There are no higher-priority threads on the system than audio except for the VM pager. If it's not VM, then we can begin to wonder whether it's something like graphic card interrupts ... harder to identify with instrumentatation.

Doug
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.


References: 
 >Overload issues (From: Glenn Maynard <email@hidden>)
 >Re: Overload issues (From: Jeff Moore <email@hidden>)
 >Re: Overload issues (From: Glenn Maynard <email@hidden>)

  • Prev by Date: Re: Overload issues
  • Next by Date: Re: Overload issues
  • Previous by thread: Re: Overload issues
  • Next by thread: Re: Overload issues
  • Index(es):
    • Date
    • Thread