On Sun, Nov 03, 2019 at 12:17:13PM +0100, Jeremie Courreges-Anglas wrote:
> I'm sitting on a few changes in devel/git since some time already.
Thanks, I never noticed these until now.

> - nghttp2 should not be listed here IMO.  It really is a dep of libcurl,
>   git itself doesn't use directly the nghttp API.
This might just be another remnant just like the recent removal of rsync
as RDEP.

> - sysctl(HW_PHYSMEM) wants an int.  That doesn't work well if you have
>   a decent amount or ram.  What doesn't work well either is storing that
>   int in the first bytes of an uninitialized int64_t stack variable.
>   Let's properly use HW_PHYSMEM64 instead.  I have left the HW_PHYSMEM
>   code path so that the diff can be pushed upstream as-is without too
>   many questions, but I'm not sure it makes much sense.
HW_PHYSMEM64 should really be used unconditionally, no?  Can we actually
reach the case where HAVE_BSD_SYSCTL and HW_PHYSMEM are defined but
HW_PHYSMEM64 is not?  What about other BSDs?

> - with hw.smt=0, git may use more threads than the number of available
>   cpu cores.  I initally noticed this when testing the hw.smt diffs on
>   my x230 a few releases ago.  The simple solution is to reorder the
>   code to avoid using HW_NCPU.
This can be easily seen with `top -H -C -g git' and `git gc --aggressive'
on any repository;  without the patch it always spawns four packer
threads regardless of `hw.smt'.  With your diff and SMT turned off on my
X230 git only starts two not four additional threads.

OK kn but as per above, I'm not sure about the memory bits.

Reply via email to