One thing we can try is automating the right setting for 
MAX_CONCURRENT_THREAD_NUMBER. In Windows, there's a command line utility to 
return the number of logical processors.

        C:\Users\sample>wmic cpu get numberoflogicalprocessors
        NumberOfLogicalProcessors
        4 

This could be used to set MAX_CONCURRENT_THREAD_NUMBER 
(NumberOfLogicalProcessors+1, so 5 in this case) automagically in target.txt 
(via edksetup.bat) or as a command line parameter (in BuildBios.bat). I'm sure 
there's an equivalent shell command in Linux that can be co-opted for our 
purposes.

Thoughts?

Thanks ... br
---
Brian Richardson, Senior Technical Marketing Engineer, Intel Software
brian.richard...@intel.com -- @intel_Brian (Twitter & WeChat)
https://software.intel.com/en-us/meet-the-developers/evangelists/team/brian-richardson
 

-----Original Message-----
From: Rebecca Cran [mailto:rebe...@bluestop.org] 
Sent: Thursday, February 23, 2017 2:10 PM
To: Brian J. Johnson <brian.john...@hpe.com>; Wei, David <david....@intel.com>; 
Richardson, Brian <brian.richard...@intel.com>; Gao, Liming 
<liming....@intel.com>; edk2-devel@lists.01.org
Cc: Lu, ShifeiX A <shifeix.a...@intel.com>; Zimmer, Vincent 
<vincent.zim...@intel.com>; Andrew Fish <af...@apple.com>
Subject: Re: [edk2] Improvements to build system etc. for edk2-platforms 
devel-MinnowBoard3?

On 2/23/2017 11:53 AM, Brian J. Johnson wrote:

> Sorry if I'm bikeshedding...  NUMBER_OF_PROCESSORS isn't a good 
> default for those of us who build on servers with hundreds of threads 
> available.  The OS, disks, and build.exe/build.py become bottlenecks.
> Maybe we could put a cap (say, 20) on the default thread limit, so it 
> uses NUMBER_OF_PROCESSORS or 20 threads, whichever is less.
>
> Or just set a small, fixed number of threads by default and document 
> better how to change it, as others suggested.

Good point. I think the best approach will be to have a --setup parameter which 
configures defaults in Conf/target.txt, after which users can change 
MAX_CONCURRENT_THREAD_NUMBER - instead of the current method which involves 
figuring out which of files ends up running build.exe with '-n <threads>'.

-- 
Rebecca
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to