No description
Find a file
Marco Elver 1fd76043ec compiler_types.h: Optimize __unqual_scalar_typeof compilation time
If the compiler supports C11's _Generic, use it to speed up compilation
times of __unqual_scalar_typeof(). GCC version 4.9 or later and
all supported versions of Clang support the feature (the oldest
supported compiler that doesn't support _Generic is GCC 4.8, for which
we use the slower alternative).

The non-_Generic variant relies on multiple expansions of
__pick_integer_type -> __pick_scalar_type -> __builtin_choose_expr,
which increases pre-processed code size, and can cause compile times to
increase in files with numerous expansions of READ_ONCE(), or other
users of __unqual_scalar_typeof().

Summary of compile-time benchmarking done by Arnd Bergmann:

  <baseline normalized time>  clang-11   gcc-9
  this patch                      0.78    0.91
  ideal                           0.76    0.86

See https://lkml.kernel.org/r/CAK8P3a3UYQeXhiufUevz=rwe09WM_vSTCd9W+KvJHJcOeQyWVA@mail.gmail.com

Further compile-testing done with:
  gcc 4.8, 4.9, 5.5, 6.4, 7.5, 8.4;
  clang 9, 10.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Tested-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lkml.kernel.org/r/20200527103236.148700-1-elver@google.com
Link: https://lkml.kernel.org/r/CAK8P3a0RJtbVi1JMsfik=jkHCNFv+DJn_FeDg-YLW+ueQW3tNg@mail.gmail.com
[will: tweak new macros to make them a bit more readable]
Signed-off-by: Will Deacon <will@kernel.org>
2020-06-05 11:38:58 +01:00
arch arm64: barrier: Use '__unqual_scalar_typeof' for acquire/release macros 2020-04-16 12:28:35 +01:00
block block-5.7-2020-04-10 2020-04-10 10:06:54 -07:00
certs .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
crypto compiler/gcc: Raise minimum GCC version for kernel builds to 4.8 2020-04-15 21:36:20 +01:00
Documentation compiler/gcc: Raise minimum GCC version for kernel builds to 4.8 2020-04-15 21:36:20 +01:00
drivers READ_ONCE: Enforce atomicity for {READ,WRITE}_ONCE() memory accesses 2020-04-16 12:28:07 +01:00
fs 10 smb fixes most RDMA (smbdirect) related, also add experimental support for swap over SMB3 mounts, and also adds fix which improves performance of signed connections 2020-04-12 09:41:01 -07:00
include compiler_types.h: Optimize __unqual_scalar_typeof compilation time 2020-06-05 11:38:58 +01:00
init compiler/gcc: Raise minimum GCC version for kernel builds to 4.8 2020-04-15 21:36:20 +01:00
ipc ipc/util.c: sysvipc_find_ipc() should increase position index 2020-04-10 15:36:22 -07:00
kernel gcov: Remove old GCC 3.4 support 2020-04-16 12:28:35 +01:00
lib fault_inject: Don't rely on "return value" from WRITE_ONCE() 2020-04-15 21:36:41 +01:00
LICENSES LICENSES: Rename other to deprecated 2019-05-03 06:34:32 -06:00
mm Merge branch 'akpm' (patches from Andrew) 2020-04-10 17:57:48 -07:00
net net: tls: Avoid assigning 'const' pointer to non-const pointer 2020-04-15 21:36:41 +01:00
samples samples/hw_breakpoint: drop use of kallsyms_lookup_name() 2020-04-07 10:43:44 -07:00
scripts compiler/gcc: Raise minimum GCC version for kernel builds to 4.8 2020-04-15 21:36:20 +01:00
security Keyrings fixes 2020-04-04 12:24:47 -07:00
sound sound fixes for 5.7-rc1 2020-04-10 12:27:06 -07:00
tools Kbuild updates for v5.7 (2nd) 2020-04-11 09:46:12 -07:00
usr kbuild: fix comment about missing include guard detection 2020-04-11 12:09:48 +09:00
virt KVM: Pass kvm_init()'s opaque param to additional arch funcs 2020-03-31 10:48:03 -04:00
.clang-format clang-format: Update with the latest for_each macro list 2020-03-06 21:50:05 +01:00
.cocciconfig
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl 2019-05-16 10:53:40 -07:00
.gitattributes .gitattributes: use 'dts' diff driver for dts files 2019-12-04 19:44:11 -08:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
.mailmap mailmap: Add Sedat Dilek (replacement for expired email address) 2020-04-11 09:28:34 -07:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: Hand MIPS over to Thomas 2020-02-24 22:43:18 -08:00
Kbuild kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
Kconfig docs: kbuild: convert docs to ReST and rename to *.rst 2019-06-14 14:21:21 -06:00
MAINTAINERS MAINTAINERS: sort field names for all entries 2020-04-12 11:04:58 -07:00
Makefile Linux 5.7-rc1 2020-04-12 12:35:55 -07:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.