Go to file
Sultan Alsawaf d516115a24 mm: Micro-optimize PID map reads for arm64 while retaining output format
Android and various applications in Android need to read PID map data in
order to work. Some processes can contain over 10,000 mappings, which
results in lots of time wasted on simply generating strings. This wasted
time adds up, especially in the case of Unity-based games, which utilize
the Boehm garbage collector. A game's main process typically has well
over 10,000 mappings due to the loaded textures, and the Boehm GC reads
PID maps several times a second. This results in over 100,000 map
entries being printed out per second, so micro-optimization here is
important. Before this commit, show_vma_header_prefix() would typically
take around 1000 ns to run on a Snapdragon 855; now it only takes about
50 ns to run, which is a 20x improvement.

The primary micro-optimizations here assume that there are no more than
40 bits in the virtual address space, hence the CONFIG_ARM64_VA_BITS
check. Arm64 uses a virtual address size of 39 bits, so this perfectly
covers it.

This also removes padding used to beautify PID map output to further
speed up reads and reduce the amount of bytes printed, and optimizes the
dentry path retrieval for file-backed mappings. Note, however, that the
trailing space at the end of the line for non-file-backed mappings
cannot be omitted, as it breaks some PID map parsers.

This still retains insignificant leading zeros from printed hex values
to maintain the current output format.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: LibXZR <xzr467706992@163.com>
2022-11-12 11:24:17 +00:00
android ANDROID: fix up abi issue with struct snd_pcm_runtime 2022-05-18 14:50:41 +02:00
arch arm64: Allow LD_DEAD_CODE_DATA_ELIMINATION to be selected 2022-11-12 11:24:07 +00:00
block UPSTREAM: hrtimer: Consolidate hrtimer_init() + hrtimer_init_sleeper() calls 2022-11-12 11:23:54 +00:00
certs Merge remote-tracking branch 'aosp/android-4.19-stable' into android12-base 2022-07-09 10:34:17 +05:30
crypto crypto: move Jitter RNG header include dir 2022-11-12 11:23:16 +00:00
Documentation UPSTREAM: locking/lockdep: Add explanation to lock usage rules in lockdep design doc 2022-11-12 11:23:42 +00:00
drivers msm: msm_bus: Don't enable QoS clocks when none are present 2022-11-12 11:24:16 +00:00
firmware Fix built-in early-load Intel microcode alignment 2020-01-23 08:21:29 +01:00
fs mm: Micro-optimize PID map reads for arm64 while retaining output format 2022-11-12 11:24:17 +00:00
include mm: Micro-optimize PID map reads for arm64 while retaining output format 2022-11-12 11:24:17 +00:00
init lto: Add Link Time Optimization support for GCC 2022-11-12 11:24:06 +00:00
ipc vm_ops: rename .split() callback to .may_split() 2022-11-12 11:21:26 +00:00
kernel qos: Remove pm_qos_update_request_timeout() API 2022-11-12 11:24:15 +00:00
lib scatterlist: Don't allocate sg lists using __get_free_page 2022-11-12 11:24:00 +00:00
LICENSES LICENSES: Add ISC license text 2019-01-10 17:22:01 +02:00
mm mm: kmemleak: Don't require global debug options or debugfs 2022-11-12 11:24:00 +00:00
net UPSTREAM: hrtimer: Consolidate hrtimer_init() + hrtimer_init_sleeper() calls 2022-11-12 11:23:54 +00:00
samples This is the 4.19.218 stable release 2021-11-26 15:19:33 +01:00
scripts lto: Add Link Time Optimization support for GCC 2022-11-12 11:24:06 +00:00
security selinux: Avoid dynamic memory allocation for INITCONTEXTLEN buffers 2022-11-12 11:24:13 +00:00
sound ALSA: control_compat: Don't dynamically allocate single-use structs 2022-11-12 11:24:10 +00:00
techpack drm/msm/sde: Don't clear dim layers when there aren't any applied 2022-11-12 11:24:16 +00:00
tools UPSTREAM: selftests/damon: support watermarks 2022-11-12 11:22:55 +00:00
usr initramfs: restore default compression behavior 2020-04-13 10:44:59 +02:00
virt mm: treewide: remove unused address argument from pte_alloc functions 2022-11-12 11:21:18 +00:00
.clang-format clang-format: Set IndentWrappedFunctionNames false 2018-08-01 18:38:51 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes .gitattributes: set git diff driver for C source code files 2016-10-07 18:46:30 -07:00
.gitignore .gitignore: remove dts vendor 2022-11-12 11:19:05 +00:00
.gitmodules mkdtimg: Bundle upstream python rewrite as submodule 2022-11-12 11:19:02 +00:00
.mailmap libnvdimm-for-4.19_misc 2018-08-25 18:13:10 -07:00
AndroidKernel.mk AndroidKernel: add TARGET_PREBUILT_INT_KERNEL_IMAGE 2019-08-02 20:31:09 +08:00
build.config.aarch64 ANDROID: enable LLVM_IAS=1 for clang's integrated assembler for aarch64 2021-01-11 17:34:43 -08:00
build.config.allmodconfig ANDROID: Different fix for KABI breakage in 4.19.209 in struct sock 2021-10-11 19:44:01 +00:00
build.config.allmodconfig.aarch64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.allmodconfig.arm ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.allmodconfig.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.arm Revert "ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple" 2020-11-10 11:47:24 -08:00
build.config.common ANDROID: clang: update to 12.0.5 2021-04-19 19:40:51 +00:00
build.config.gki ANDROID: gki: Removed cf modules from gki_defconfig 2020-01-31 16:23:38 -08:00
build.config.gki_kasan ANDROID: build_config: drop CONFIG_KASAN_PANIC_ON_WARN 2021-02-15 18:29:34 +00:00
build.config.gki_kasan.aarch64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki_kasan.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki_kprobes ANDROID: Adding kprobes build configs for Cuttlefish 2021-02-28 05:19:39 +00:00
build.config.gki_kprobes.aarch64 ANDROID: Adding kprobes build configs for Cuttlefish 2021-02-28 05:19:39 +00:00
build.config.gki_kprobes.x86_64 ANDROID: Adding kprobes build configs for Cuttlefish 2021-02-28 05:19:39 +00:00
build.config.gki-debug.aarch64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki-debug.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.gki.aarch64 ANDROID: GKI: prevent removal of monitored symbols 2020-09-29 11:48:43 +01:00
build.config.gki.x86_64 ANDROID: drop KERNEL_DIR setting in build.config.common 2020-09-25 15:14:51 +08:00
build.config.goldfish.arm ANDROID: build.config: enforce trace_printk check 2018-08-28 17:10:42 +05:30
build.config.goldfish.arm64 ANDROID: build.config: enforce trace_printk check 2018-08-28 17:10:42 +05:30
build.config.goldfish.mips ANDROID: build.config: enforce trace_printk check 2018-08-28 17:10:42 +05:30
build.config.goldfish.mips64 ANDROID: build.config: enforce trace_printk check 2018-08-28 17:10:42 +05:30
build.config.goldfish.x86 ANDROID: build.config: enforce trace_printk check 2018-08-28 17:10:42 +05:30
build.config.goldfish.x86_64 ANDROID: build.config: enforce trace_printk check 2018-08-28 17:10:42 +05:30
build.config.x86_64 Revert "Revert "ANDROID: enable LLVM_IAS=1 for clang's integrated assembler for x86_64"" 2021-02-03 13:34:51 -08:00
COPYING COPYING: use the new text with points to the license files 2018-03-23 12:41:45 -06:00
CREDITS 9p: remove Ron Minnich from MAINTAINERS 2018-08-17 16:20:26 -07:00
gen_headers_arm64.bp net: Port samsung MPTCP modifications from SM-N986B 2022-11-12 11:19:58 +00:00
gen_headers_arm.bp net: Port samsung MPTCP modifications from SM-N986B 2022-11-12 11:19:58 +00:00
Kbuild Kbuild updates for v4.15 2017-11-17 17:45:29 -08:00
Kconfig kconfig: move the "Executable file formats" menu to fs/Kconfig.binfmt 2018-08-02 08:06:55 +09:00
kernel_headers.py Change the subprocess argument to fix the build issue 2021-06-28 16:47:30 +05:30
MAINTAINERS BACKPORT: locking/rwsem: Remove arch specific rwsem files 2022-11-12 11:23:32 +00:00
Makefile kbuild: Increase GCC automatic inline instruction limit to 1000 for LTO 2022-11-12 11:24:07 +00:00
OWNERS ANDROID: Add OWNERS files referring to the respective android-mainline OWNERS 2021-04-03 14:09:44 +00:00
README Docs: Added a pointer to the formatted docs to README 2018-03-21 09:02:53 -06:00
verity_dev_keys.x509 x86_64_cuttlefish_defconfig: enable verity cert 2018-08-28 17:15:17 +05:30

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.
See Documentation/00-INDEX for a list of what is contained in each file.

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.