Bug#864639: nvidia-kernel-dkms: please support parallel builds
On Thu, Jun 15, 2017 at 02:25:42PM +0200, Andreas Beckmann wrote: > On 2017-06-12 08:27, Andras Korn wrote: > > even if dkms would pass make(1) a -j flag. (Also, while I'm sure there once > > was a reason for setting CCACHE_DISABLE=1, does it still apply?) > > I don't remember the details ... #582748 ... looks like this bug in > ccache 2.4 was fixed in ccache 3.0 (which was in squeeze). Then I'd suggest dropping CCACHE_DISABLE because ccache can help speed up builds a lot. > > I haven't tested it, but maybe the following would work: > > > > [ -x /usr/bin/nproc ] && JOBS="-j$(nproc)" > > MAKE[0]="unset ARCH; env CCACHE_DISABLE=1 NV_VERBOSE=1 \ > > make $JOBS modules KERNEL_UNAME=${kernelver}" > > Let's just honor the -j option from dkms: > > MAKE[0]="unset ARCH; env CCACHE_DISABLE=1 NV_VERBOSE=1 \ > make ${parallel_jobs+-j$parallel_jobs} modules > KERNEL_UNAME=${kernelver}" This looks good, provided the file is sourced (dkms doesn't currently export the parallel_jobs variable, so that a child process wouldn't see it). AndrĂ¡s -- Yoda of Borg, I am. Assimilated you will be, hmmm?
Bug#864639: nvidia-kernel-dkms: please support parallel builds
On 2017-06-12 08:27, Andras Korn wrote: > even if dkms would pass make(1) a -j flag. (Also, while I'm sure there once > was a reason for setting CCACHE_DISABLE=1, does it still apply?) I don't remember the details ... #582748 ... looks like this bug in ccache 2.4 was fixed in ccache 3.0 (which was in squeeze). > I haven't tested it, but maybe the following would work: > > [ -x /usr/bin/nproc ] && JOBS="-j$(nproc)" > MAKE[0]="unset ARCH; env CCACHE_DISABLE=1 NV_VERBOSE=1 \ > make $JOBS modules KERNEL_UNAME=${kernelver}" Let's just honor the -j option from dkms: MAKE[0]="unset ARCH; env CCACHE_DISABLE=1 NV_VERBOSE=1 \ make ${parallel_jobs+-j$parallel_jobs} modules KERNEL_UNAME=${kernelver}" Andreas
Bug#864639: nvidia-kernel-dkms: please support parallel builds
Package: nvidia-kernel-dkms Version: 375.66-1 Severity: wishlist Tags: upstream Hi, the nvidia driver consists of several files that can be compiled in parallel, but the dkms.conf file specifically forces a single-threaded build even if dkms would pass make(1) a -j flag. (Also, while I'm sure there once was a reason for setting CCACHE_DISABLE=1, does it still apply?) On my system, -j8 results in a dramatic improvement (build time decreases from about 7 minutes to about 1 minute). In dkms.conf, I changed MAKE[0]="unset ARCH; env CCACHE_DISABLE=1 NV_VERBOSE=1 \ make modules KERNEL_UNAME=${kernelver}" to MAKE[0]="unset ARCH; env CCACHE_DISABLE=1 NV_VERBOSE=1 \ make -j8 modules KERNEL_UNAME=${kernelver}" and got a nice speed boost (which adds up if you have several kernels installed). I haven't tested it, but maybe the following would work: [ -x /usr/bin/nproc ] && JOBS="-j$(nproc)" MAKE[0]="unset ARCH; env CCACHE_DISABLE=1 NV_VERBOSE=1 \ make $JOBS modules KERNEL_UNAME=${kernelver}" Andras -- If everyone needs to think outside the box, maybe the box needs fixing.