Re: Multi Core optimization (Olivier Tristan)

11 views
Skip to first unread message

Stéphane Letz

unread,
Oct 28, 2016, 5:21:30 PM10/28/16
to perfoptimi...@lists.apple.com, Olivier Tristan
> Today's Topics:
>
> 1. Multi Core optimization (Olivier Tristan)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 28 Oct 2016 12:12:42 +0200
> From: Olivier Tristan <o.tr...@uvi.net>
> To: perfoptimi...@lists.apple.com
> Subject: Multi Core optimization
> Message-ID: <97818c6f-463b-032c...@uvi.net>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> Hi Guys,
>
> I'm trying to thread on multiple cores the rendering done in a CoreAudio
> callback (high/realtime priority thread) in a c++ application
>
> First I tried using Intel TBB task_group which worked fine on Windows
> but it had terrible performance on OSX with lots of switch_pri mentioned
> in Instruments. (maybe related to the calling thread priority)
>
> So I tried Grand Central Dispatch and it was a bit better but not
> marvelous so I was wondering if there are some flag that are better
> suited than DISPATCH_QUEUE_PRIORITY_HIGH
>
> when used in a real time thread.
>
> Or if there is a better solution to my problem :)
>
> Thanks !
>
> --
> Olivier Tristan
> Research & Development
> www.uvi.net

I don’t think GCD will manage real time threads (= time constraint thread priority 97 on OS X). I asked the question years ago and the answer at that time was that real time threads were not supported. To to multi core optimization in our audio code, we explicitly manage our own allocated time constraint threads.

HTH,

Best Regards.

Stéphane Letz


_______________________________________________
Do not post admin requests to the list. They will be ignored.
PerfOptimization-dev mailing list (PerfOptimi...@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/perfoptimization-dev/perfoptimization-dev-garchive-8409%40googlegroups.com

This email sent to perfoptimization-...@googlegroups.com

Olivier Tristan

unread,
Oct 28, 2016, 5:55:09 PM10/28/16
to perfoptimi...@lists.apple.com
I see. That's too bad.

I will have to dig further on this THREAD_TIME_CONSTRAINT_POLICY.
and pthread_mach_thread_np() to convert from pthread to MACH API then...

Thanks Stéphane !
Reply all
Reply to author
Forward
0 new messages