[x265] [PATCH] threadpool: utilize all processors on embedded ARM platforms

Pradeep Ramachandran pradeep at multicorewareinc.com
Tue Feb 9 11:57:09 CET 2016


This was an interesting scenario. Similar issue of _SC_NPROCESSORS_ONLN not
reporting all available processors was also reported in some NVIDIA forum:
https://devtalk.nvidia.com/default/topic/744695/number-of-cpu-cores-online-in-jetson-tk1/

Has anyone else seen this problem? Is there a cleaner fix?
Pradeep.

On Tue, Feb 9, 2016 at 3:57 PM, <dnyaneshwar at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Dnyaneshwar G <dnyaneshwar at multicorewareinc.com>
> # Date 1455010589 -19800
> #      Tue Feb 09 15:06:29 2016 +0530
> # Node ID 18b83aaee1b56e2048a425c25a452aa62c39da89
> # Parent  023e6051c4c63ab1633b2de0e8f37e6158796288
> threadpool: utilize all processors on embedded ARM platforms
>
> diff -r 023e6051c4c6 -r 18b83aaee1b5 source/common/threadpool.cpp
> --- a/source/common/threadpool.cpp      Fri Feb 05 15:13:57 2016 +0530
> +++ b/source/common/threadpool.cpp      Tue Feb 09 15:06:29 2016 +0530
> @@ -528,6 +528,10 @@
>      SYSTEM_INFO sysinfo;
>      GetSystemInfo(&sysinfo);
>      return sysinfo.dwNumberOfProcessors;
> +#elif __unix__ && X265_ARCH_ARM
> +    /* Return the number of processors configured by OS. Because, most
> embedded linux distributions
> +     * uses only one processor as the scheduler doesn't have enough work
> to utilize all processors */
> +    return sysconf(_SC_NPROCESSORS_CONF);
>  #elif __unix__
>      return sysconf(_SC_NPROCESSORS_ONLN);
>  #elif MACOS
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20160209/924c1ec4/attachment.html>


More information about the x265-devel mailing list