lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNASpADhFfcMKOVPhn1q43vn5J7Jhy+m6EJCU2FBMut3QJg@mail.gmail.com>
Date:   Fri, 9 Jun 2017 03:02:54 +0900
From:   Masahiro Yamada <yamada.masahiro@...ionext.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Michal Marek <mmarek@...e.com>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Sam Ravnborg <sam@...nborg.org>
Subject: Re: [PATCH] kbuild: speed up checksyscalls.sh

Hi Arnd,

2017-06-01 23:57 GMT+09:00 Arnd Bergmann <arnd@...db.de>:
> checksyscalls.sh is run at every "make" run while building the kernel,
> even if no files have changed. I looked at where we spend time in
> a trivial empty rebuild and found checksyscalls.sh to be a source
> of noticeable overhead, as it spawns a lot of child processes just
> to call 'cat' copying from stdin to stdout, once for each of the
> over 400 x86 syscalls.
>
> Using a shell-builtin (echo) instead of the external command gives
> us a 13x speedup:
>
>     Before                 After
> real    0m1.018s       real     0m0.077s
> user    0m0.068s       user     0m0.048s
> sys     0m0.156s       sys      0m0.024s
>
> The time it took to rebuild a single file on my machine dropped
> from 5.5 seconds to 4.5 seconds.
>


I will apply this patch.
On my PC, I did not see such a big difference as you saw, though.
Big or small, it is speed-up anyway.


My test result.  Three times for each.


Without this patch:

masahiro@...ver:~/workspace/linux$ time make  prepare0
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     include/generated/bounds.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh

real 0m0.556s
user 0m0.048s
sys 0m0.028s
masahiro@...ver:~/workspace/linux$ time make  prepare0
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     include/generated/bounds.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh

real 0m0.531s
user 0m0.052s
sys 0m0.012s
masahiro@...ver:~/workspace/linux$ time make  prepare0
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     include/generated/bounds.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh

real 0m0.530s
user 0m0.040s
sys 0m0.020s



With this patch:

masahiro@...ver:~/workspace/linux$ git log -1 --oneline
b7a9f79 kbuild: speed up checksyscalls.sh
masahiro@...ver:~/workspace/linux$ time make  prepare0
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     include/generated/bounds.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh

real 0m0.384s
user 0m0.040s
sys 0m0.008s
masahiro@...ver:~/workspace/linux$ time make  prepare0
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     include/generated/bounds.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh

real 0m0.386s
user 0m0.048s
sys 0m0.000s
masahiro@...ver:~/workspace/linux$ time make  prepare0
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     include/generated/bounds.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh

real 0m0.384s
user 0m0.024s
sys 0m0.024s




-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ