From: Derrick Stolee Date: Thu, 27 Sep 2018 15:28:15 GMT Subject: Re: Git Test Coverage Report (Tuesday, Sept 25) Message-ID: <07ab14bb-766b-e375-989b-73974ef7fece@gmail.com> In-Reply-To: <225dc2e3-1aa0-ac19-26e6-59b54dfe871c@gmail.com> On 9/27/2018 11:21 AM, Ben Peart wrote: > > > On 9/26/2018 2:54 PM, Derrick Stolee wrote: >> >> GIT_TEST_INDEX_THREADS=1 >> > > Because the test repos are so small (ie smaller than 10K files), the > test suite already executes as if GIT_TEST_INDEX_THREADS=1 is set (ie > single threaded).  I added the test variable so that the > multi-threading code could be forced to execute in spite of the > default minimum number of files logic. > > I'd recommend you set GIT_TEST_INDEX_THREADS=3 instead. (3 because 1 > thread is used for loading the index extensions and we need 2 or more > threads available to exercise multi-threaded loading of the index > entries). According to t/README, GIT_TEST_INDEX_THREADS is a boolean and setting it to 1 causes us to use 3 threads:     GIT_TEST_INDEX_THREADS= forces multi-threaded loading of     the index cache entries and extensions for the whole test suite. Here is the only consumption of the variable in the product code (in read-cache.c):         /* enable testing with fewer than default minimum of entries */         if (istate->cache_nr > 1 && nr_threads < 3 && git_env_bool("GIT_TEST_INDEX_THREADS", 0))                 nr_threads = 3; This was non-obvious to me, and I had originally set it to a larger number. I happened to notice the boolean nature while I was looking up the rest of the GIT_TEST_* variables. Thanks, -Stolee