# git rev-parse -q --verify 679b68c4e8656c1aef21b7ecfc280db6b54ba2f8^{commit} 679b68c4e8656c1aef21b7ecfc280db6b54ba2f8 already have revision, skipping fetch # git checkout -q -f -B kisskb 679b68c4e8656c1aef21b7ecfc280db6b54ba2f8 # git clean -qxdf # < git log -1 # commit 679b68c4e8656c1aef21b7ecfc280db6b54ba2f8 # Author: Srikar Dronamraju # Date: Thu Dec 5 14:02:17 2019 +0530 # # powerpc/vcpu: Assume dedicated processors as non-preempt # # With commit 247f2f6f3c70 ("sched/core: Don't schedule threads on # pre-empted vCPUs"), the scheduler avoids preempted vCPUs to schedule # tasks on wakeup. This leads to wrong choice of CPU, which in-turn # leads to larger wakeup latencies. Eventually, it leads to performance # regression in latency sensitive benchmarks like soltp, schbench etc. # # On Powerpc, vcpu_is_preempted() only looks at yield_count. If the # yield_count is odd, the vCPU is assumed to be preempted. However # yield_count is increased whenever the LPAR enters CEDE state (idle). # So any CPU that has entered CEDE state is assumed to be preempted. # # Even if vCPU of dedicated LPAR is preempted/donated, it should have # right of first-use since they are supposed to own the vCPU. # # On a Power9 System with 32 cores # # lscpu # Architecture: ppc64le # Byte Order: Little Endian # CPU(s): 128 # On-line CPU(s) list: 0-127 # Thread(s) per core: 8 # Core(s) per socket: 1 # Socket(s): 16 # NUMA node(s): 2 # Model: 2.2 (pvr 004e 0202) # Model name: POWER9 (architected), altivec supported # Hypervisor vendor: pHyp # Virtualization type: para # L1d cache: 32K # L1i cache: 32K # L2 cache: 512K # L3 cache: 10240K # NUMA node0 CPU(s): 0-63 # NUMA node1 CPU(s): 64-127 # # # perf stat -a -r 5 ./schbench # v5.4 v5.4 + patch # Latency percentiles (usec) Latency percentiles (usec) # 50.0000th: 45 50.0000th: 39 # 75.0000th: 62 75.0000th: 53 # 90.0000th: 71 90.0000th: 67 # 95.0000th: 77 95.0000th: 76 # *99.0000th: 91 *99.0000th: 89 # 99.5000th: 707 99.5000th: 93 # 99.9000th: 6920 99.9000th: 118 # min=0, max=10048 min=0, max=211 # Latency percentiles (usec) Latency percentiles (usec) # 50.0000th: 45 50.0000th: 34 # 75.0000th: 61 75.0000th: 45 # 90.0000th: 72 90.0000th: 53 # 95.0000th: 79 95.0000th: 56 # *99.0000th: 691 *99.0000th: 61 # 99.5000th: 3972 99.5000th: 63 # 99.9000th: 8368 99.9000th: 78 # min=0, max=16606 min=0, max=228 # Latency percentiles (usec) Latency percentiles (usec) # 50.0000th: 45 50.0000th: 34 # 75.0000th: 61 75.0000th: 45 # 90.0000th: 71 90.0000th: 53 # 95.0000th: 77 95.0000th: 57 # *99.0000th: 106 *99.0000th: 63 # 99.5000th: 2364 99.5000th: 68 # 99.9000th: 7480 99.9000th: 100 # min=0, max=10001 min=0, max=134 # Latency percentiles (usec) Latency percentiles (usec) # 50.0000th: 45 50.0000th: 34 # 75.0000th: 62 75.0000th: 46 # 90.0000th: 72 90.0000th: 53 # 95.0000th: 78 95.0000th: 56 # *99.0000th: 93 *99.0000th: 61 # 99.5000th: 108 99.5000th: 64 # 99.9000th: 6792 99.9000th: 85 # min=0, max=17681 min=0, max=121 # Latency percentiles (usec) Latency percentiles (usec) # 50.0000th: 46 50.0000th: 33 # 75.0000th: 62 75.0000th: 44 # 90.0000th: 73 90.0000th: 51 # 95.0000th: 79 95.0000th: 54 # *99.0000th: 113 *99.0000th: 61 # 99.5000th: 2724 99.5000th: 64 # 99.9000th: 6184 99.9000th: 82 # min=0, max=9887 min=0, max=121 # # Performance counter stats for 'system wide' (5 runs): # # context-switches 43,373 ( +- 0.40% ) 44,597 ( +- 0.55% ) # cpu-migrations 1,211 ( +- 5.04% ) 220 ( +- 6.23% ) # page-faults 15,983 ( +- 5.21% ) 15,360 ( +- 3.38% ) # # Waiman Long suggested using static_keys. # # Fixes: 247f2f6f3c70 ("sched/core: Don't schedule threads on pre-empted vCPUs") # Cc: stable@vger.kernel.org # v4.18+ # Reported-by: Parth Shah # Reported-by: Ihor Pasichnyk # Tested-by: Juri Lelli # Acked-by: Waiman Long # Reviewed-by: Gautham R. Shenoy # Signed-off-by: Srikar Dronamraju # Acked-by: Phil Auld # Reviewed-by: Vaidyanathan Srinivasan # Tested-by: Parth Shah # Signed-off-by: Michael Ellerman # Link: https://lore.kernel.org/r/20191205083218.25824-1-srikar@linux.vnet.ibm.com # < /opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux-gcc --version # < /opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux-ld --version # < git log --format=%s --max-count=1 679b68c4e8656c1aef21b7ecfc280db6b54ba2f8 # < make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_pseries_defconfig+FA_DUMP_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- pseries_defconfig # Added to kconfig CONFIG_CRASH_DUMP=y # Added to kconfig CONFIG_FA_DUMP=y # yes \n | make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_pseries_defconfig+FA_DUMP_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- oldconfig yes: standard output: Broken pipe # make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_pseries_defconfig+FA_DUMP_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- /kisskb/src/drivers/base/regmap/regmap.c: In function 'regmap_raw_read': /kisskb/src/drivers/base/regmap/regmap.c:2591:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/base/regmap/regmap.c: In function '_regmap_raw_write': /kisskb/src/drivers/base/regmap/regmap.c:1852:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/printk/printk.c: In function 'devkmsg_sysctl_set_loglvl': /kisskb/src/kernel/printk/printk.c:204:16: warning: 'old' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/ext4/extents.c: In function 'ext4_convert_unwritten_io_end_vec': /kisskb/src/fs/ext4/extents.c:5054:23: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/net/bridge/br_netlink.c: In function 'br_afspec.isra.30': /kisskb/src/net/bridge/br_netlink.c:648:7: warning: 'err' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/mm/hugetlb.c: In function 'alloc_pool_huge_page': /kisskb/src/mm/hugetlb.c:1377:5: warning: 'page' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c: In function 'proc_reg_open': /kisskb/src/include/linux/list.h:65:12: warning: 'pdeo' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c:338:21: note: 'pdeo' was declared here /kisskb/src/drivers/tty/serial/8250/8250_core.c: In function 'univ8250_release_irq': /kisskb/src/drivers/tty/serial/8250/8250_core.c:248:18: warning: 'i' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/tty/serial/8250/8250_core.c:228:19: note: 'i' was declared here /kisskb/src/fs/nfsd/nfs4xdr.c: In function 'nfsd4_encode_components_esc': /kisskb/src/fs/nfsd/nfs4xdr.c:2076:9: warning: 'str' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/usb/core/devio.c: In function 'async_completed': /kisskb/src/drivers/usb/core/devio.c:625:23: warning: 'errno' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/udf/unicode.c: In function 'udf_name_conv_char': /kisskb/src/fs/udf/unicode.c:132:8: warning: 'c' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/net/core/devlink.c: In function 'devlink_fmsg_prepare_skb': /kisskb/src/net/core/devlink.c:4613:6: warning: 'err' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/net/tun.c: In function 'tun_get_user': /kisskb/src/drivers/net/tun.c:1836:30: warning: 'copylen' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/net/tun.c:1749:46: warning: 'linear' may be used uninitialized in this function [-Wuninitialized] WARNING: 2 bad relocations c00000000160b950 R_PPC64_ADDR64 _binary__btf_vmlinux_bin_start c00000000160b958 R_PPC64_ADDR64 _binary__btf_vmlinux_bin_end Completed OK # rm -rf /kisskb/build/powerpc-fixes_pseries_defconfig+FA_DUMP_powerpc-gcc4.6 # Build took: 0:02:41.507512