Re: Increases in build system time
Mateusz Guzik wrote: > Can you get a kernel-side flamegraph? Done, using sources from 2019.11.14.13.58.22: http://www.gson.org/netbsd/bugs/system-time/fg.svg -- Andreas Gustafsson, g...@gson.org
Re: Increases in build system time
On 11/15/19, Andreas Gustafsson wrote: > Mateusz Guzik wrote: >> Can you get a kernel-side flamegraph? > > Done, using sources from 2019.11.14.13.58.22: > > http://www.gson.org/netbsd/bugs/system-time/fg.svg > Thanks. First thing which jumps at me is DIAGNOSTIC being on (seen with e.g., _vstate_assert). Did your older kernels have it? If you just compiled GENERIC from release branches it is presumably removed, so would be nice to retest without it. Then there is very minor stuff which in isolation wont make a difference but would be nice take care of: - pmap_page_copy uses memcpy, which performs a little bit extra work on top of just copying - the size is known at compilation time and both addresses are guaranteed to be aligned to 4096. Therefore it can just copy without trying to align. iow this should use a dedicated routine. - pmap_page_zero uses non-temporal stores, which are almost guaranteed to only add to cache misses later on - background page zeroing probably does not win anything and only adds to contention on uvm_fpageqlock. I don't know if I'm reading this right, but it seems the lock itself is only a spinlock to accomodate its use from the idle loop. Should the feature be eliminated on amd64, the lock can be converted to just a regular lock which would be faster single-threaded (no interrupt crappery) and multi-threaded (no need to read off IPL from the lock) Here I don't see what uvm_fault_internal is contending on, it's most likely aforementioned uvm_fpageqlock. A couple years back I wrote a patch to batch ops using the lock, can probably be reasonably easily forward-ported. That said, can you rerun without DIGANOSTIC but with lockstat? -- Mateusz Guzik
Re: Increases in build system time
Please un-CC me from any threads.
Re: Increases in build system time
Jaromír Doleček wrote: > I wonder also if we could try enabling vm.ubc_direct on the build machine? Using 2019.11.14.13.58.22 sources: with default settings: 4612.56 real 16896.10 user 9325.87 sys with vm.ubc_direct = 1: 4615.95 real 16819.96 user 9416.13 sys -- Andreas Gustafsson, g...@gson.org
Re: Increases in build system time
Mateusz Guzik wrote: > > http://www.gson.org/netbsd/bugs/system-time/fg.svg > > First thing which jumps at me is DIAGNOSTIC being on (seen with e.g., > _vstate_assert). Did your older kernels have it? If you just compiled > GENERIC from release branches it is presumably removed, so would be > nice to retest without it. All the versions tested were built from the CVS trunk, and all used the GENERIC kernel. The only thing from a release branch was the build target (8.1), which was the same in all test runs. > That said, can you rerun without DIGANOSTIC but with lockstat? I'd rather leave that to someone else, and to a separate thread. All the test results presented in this thread were produced with the same options so that they can be meaningfully compared, and running new tests with different options would only confuse things. -- Andreas Gustafsson, g...@gson.org
Re: Increases in build system time
Andreas Gustafsson wrote in <24014.56871.750141.885...@guava.gson.org>: |Jaromír Doleček wrote: |> I wonder also if we could try enabling vm.ubc_direct on the build \ |> machine? | |Using 2019.11.14.13.58.22 sources: | |with default settings: |4612.56 real 16896.10 user 9325.87 sys | |with vm.ubc_direct = 1: |4615.95 real 16819.96 user 9416.13 sys This thread reminds me of me turning off hyperthreading. Using the four cores i have with HT turned on results in a 40 percent time penalty compared to when its off. (For example, compiling the Linux kernel 4.19.X takes almost exactly 10 minutes when it is turned off, and about 14 minutes when it is turned on. Just a thought.) --steffen | |Der Kragenbaer,The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)
Re: Increases in build system time
Steffen Nurpmeso wrote: > This thread reminds me of me turning off hyperthreading. > Using the four cores i have with HT turned on results in a 40 > percent time penalty compared to when its off. (For example, > compiling the Linux kernel 4.19.X takes almost exactly 10 minutes > when it is turned off, and about 14 minutes when it is turned > on. Just a thought.) FWIW, these tests were run with hyperthreading disabled. -- Andreas Gustafsson, g...@gson.org
daily CVS update output
Updating src tree: P src/share/mk/bsd.sys.mk P src/sys/arch/amd64/amd64/cpu_in_cksum.S P src/sys/arch/amd64/amd64/cpufunc.S P src/sys/arch/i386/i386/cpufunc.S P src/sys/arch/powerpc/oea/ofw_subr.S P src/sys/arch/powerpc/powerpc/openfirm.c P src/sys/arch/x86/include/pio.h P src/sys/dev/hyperv/hvkbd.c P src/sys/dev/hyperv/if_hvn.c P src/sys/dev/ic/rtl81x9reg.h P src/sys/dev/pci/if_msk.c P src/sys/dev/pci/if_skreg.h P src/sys/kern/subr_csan.c P src/sys/kern/subr_kcov.c P src/sys/kern/subr_msan.c P src/sys/kern/vfs_subr.c P src/sys/sys/systm.h Updating xsrc tree: Killing core files: Updating tar files: src/top-level: collecting... replacing... done src/bin: collecting... replacing... done src/common: collecting... replacing... done src/compat: collecting... replacing... done src/crypto: collecting... replacing... done src/dist: collecting... replacing... done src/distrib: collecting... replacing... done src/doc: collecting... replacing... done src/etc: collecting... replacing... done src/external: collecting... replacing... done src/extsrc: collecting... replacing... done src/games: collecting... replacing... done src/gnu: collecting...pax: Unable to access src/gnu (No such file or directory) pax: WARNING! These file names were not selected: src/gnu done src/include: collecting... replacing... done src/lib: collecting... replacing... done src/libexec: collecting... replacing... done src/regress: collecting... replacing... done src/rescue: collecting... replacing... done src/sbin: collecting... replacing... done src/share: collecting... replacing... done src/sys: collecting... replacing... done src/tests: collecting... replacing... done src/tools: collecting... replacing... done src/usr.bin: collecting... replacing... done src/usr.sbin: collecting... replacing... done src/config: collecting... replacing... done src: collecting... replacing... done xsrc/top-level: collecting... replacing... done xsrc/external: collecting... replacing... done xsrc/local: collecting... replacing... done xsrc: collecting... replacing... done Updating release-7 src tree (netbsd-7): U doc/CHANGES-7.3 P sys/dev/pci/pucdata.c Updating release-7 xsrc tree (netbsd-7): Updating release-7 tar files: src/top-level: collecting... replacing... done src/bin: collecting... replacing... done src/common: collecting... replacing... done src/compat: collecting... replacing... done src/crypto: collecting... replacing... done src/dist: collecting... replacing... done src/distrib: collecting... replacing... done src/doc: collecting... replacing... done src/etc: collecting... replacing... done src/external: collecting... replacing... done src/extsrc: collecting... replacing... done src/games: collecting... replacing... done src/gnu: collecting... replacing... done src/include: collecting... replacing... done src/lib: collecting... replacing... done src/libexec: collecting... replacing... done src/regress: collecting... replacing... done src/rescue: collecting... replacing... done src/sbin: collecting... replacing... done src/share: collecting... replacing... done src/sys: collecting... replacing... done src/tests: collecting... replacing... done src/tools: collecting... replacing... done src/usr.bin: collecting... replacing... done src/usr.sbin: collecting... replacing... done src/config: collecting... replacing... done src/x11: collecting... replacing... done src: collecting... replacing... done xsrc/top-level: collecting... replacing... done xsrc/external: collecting... replacing... done xsrc/local: collecting... replacing... done xsrc/xfree: collecting... replacing... done xsrc: collecting... replacing... done Updating release-8 src tree (netbsd-8): U doc/CHANGES-8.2 P sys/arch/amiga/dev/if_qn.c P sys/arch/amiga/dev/zssc.c P sys/arch/mac68k/obio/iwm_fd.c P sys/arch/mvme68k/dev/wdsc.c P sys/arch/next68k/dev/nextdisplay.c P sys/arch/x86/x86/intr.c P sys/dev/gpib/ct.c P sys/dev/gpib/mt.c P sys/dev/gpib/ppi.c P sys/dev/isa/if_iy.c P sys/dev/isa/mcd.c P sys/dev/isa/tcic2_isa.c P sys/dev/isa/uha_isa.c P sys/dev/pci/if_stge.c P sys/dev/pci/neo.c P sys/dev/pci/pucdata.c P sys/dev/pci/ixgbe/ixv.c P sys/dev/pcmcia/if_tr_pcmcia.c P sys/dev/sbus/sio16.c P sys/external/bsd/drm2/dist/drm/drm_fb_helper.c P sys/net/if_loop.c P sys/net/if_vlan.c Updating release-8 xsrc tree (netbsd-8): Updating release-8 tar files: src/top-level: collecting... replacing... done src/bin: collecting... replacing... done src/common: collecting... replacing... done src/compat: collecting... replacing... done src/crypto: collecting... replacing... done src/dist: collecting... replacing... done src/distrib: collecting... replacing... done src/doc: collecting... replacing... done src/etc: collecting... replacing... done src/external: collecting... replacing... done src/extsrc: collecting... replacing... done src/games: collecting... replacing... done src/gnu: collecting...pax: Unable to access src/gnu (No such file or directory) pax: WARNING! These file names were not s