# git rev-parse -q --verify 4df910620bebb5cfe234af16ac8f6474b60215fd^{commit} 4df910620bebb5cfe234af16ac8f6474b60215fd already have revision, skipping fetch # git checkout -q -f -B kisskb 4df910620bebb5cfe234af16ac8f6474b60215fd # git clean -qxdf # < git log -1 # commit 4df910620bebb5cfe234af16ac8f6474b60215fd # Author: Feng Tang # Date: Wed Nov 25 13:22:21 2020 +0800 # # mm: memcg: relayout structure mem_cgroup to avoid cache interference # # 0day reported one -22.7% regression for will-it-scale page_fault2 # case [1] on a 4 sockets 144 CPU platform, and bisected to it to be # caused by Waiman's optimization (commit bd0b230fe1) of saving one # 'struct page_counter' space for 'struct mem_cgroup'. # # Initially we thought it was due to the cache alignment change introduced # by the patch, but further debug shows that it is due to some hot data # members ('vmstats_local', 'vmstats_percpu', 'vmstats') sit in 2 adjacent # cacheline (2N and 2N+1 cacheline), and when adjacent cache line prefetch # is enabled, it triggers an "extended level" of cache false sharing for # 2 adjacent cache lines. # # So exchange the 2 member blocks, while keeping mostly the original # cache alignment, which can restore and even enhance the performance, # and save 64 bytes of space for 'struct mem_cgroup' (from 2880 to 2816, # with 0day's default RHEL-8.3 kernel config) # # [1]. https://lore.kernel.org/lkml/20201102091543.GM31092@shao2-debian/ # # Fixes: bd0b230fe145 ("mm/memcg: unify swap and memsw page counters") # Reported-by: kernel test robot # Signed-off-by: Feng Tang # Acked-by: Waiman Long # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/mips-linux/bin/mips-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/mips-linux/bin/mips-linux-ld --version # < git log --format=%s --max-count=1 4df910620bebb5cfe234af16ac8f6474b60215fd # < make -s -j 120 ARCH=mips O=/kisskb/build/linus_mips-allnoconfig_mips-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/mips-linux/bin/mips-linux- allnoconfig # make -s -j 120 ARCH=mips O=/kisskb/build/linus_mips-allnoconfig_mips-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/mips-linux/bin/mips-linux- FIT description: Linux 5.10.0-rc5+ Created: Fri Nov 27 06:59:40 2020 Image 0 (kernel@0) Description: Linux 5.10.0-rc5+ Created: Fri Nov 27 06:59:40 2020 Type: Kernel Image Compression: gzip compressed Data Size: 679615 Bytes = 663.69 KiB = 0.65 MiB Architecture: MIPS OS: Linux Load Address: 0x80100000 Entry Point: 0x8022f83c Hash algo: sha1 Hash value: 2f3a91c71bb24e297a32e5ef1a9222a4d740902d Default Configuration: 'conf@default' Configuration 0 (conf@default) Description: Generic Linux kernel Kernel: kernel@0 Completed OK # rm -rf /kisskb/build/linus_mips-allnoconfig_mips-gcc4.9 # Build took: 0:00:12.327233