# 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/korg/gcc-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 679b68c4e8656c1aef21b7ecfc280db6b54ba2f8 # < make -s -j 80 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_defconfig+KVM_powerpc-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- mpc85xx_defconfig # Added to kconfig CONFIG_PPC_E500MC=y # Added to kconfig CONFIG_VIRTUALIZATION=y # Added to kconfig CONFIG_KVM_E500MC=y # Added to kconfig # yes \n | make -s -j 80 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_defconfig+KVM_powerpc-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- oldconfig yes: standard output: Broken pipe # make -s -j 80 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_defconfig+KVM_powerpc-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- In file included from /kisskb/src/include/linux/kernel.h:11, from /kisskb/src/include/linux/list.h:9, from /kisskb/src/include/linux/module.h:12, from /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:15: /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c: In function 'allocate_bd': /kisskb/src/include/linux/err.h:22:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) ^ /kisskb/src/include/linux/compiler.h:78:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:139:6: note: in expansion of macro 'IS_ERR_VALUE' if (IS_ERR_VALUE(fep->ring_mem_addr)) ^~~~~~~~~~~~ In file included from /kisskb/src/include/linux/acpi.h:15, from /kisskb/src/include/linux/i2c.h:13, from /kisskb/src/include/uapi/linux/fb.h:6, from /kisskb/src/include/linux/fb.h:6, from /kisskb/src/drivers/video/fbdev/fsl-diu-fb.c:20: /kisskb/src/drivers/video/fbdev/fsl-diu-fb.c: In function 'fsl_diu_ioctl': /kisskb/src/include/linux/device.h:1776:2: warning: this statement may fall through [-Wimplicit-fallthrough=] _dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/drivers/video/fbdev/fsl-diu-fb.c:1287:3: note: in expansion of macro 'dev_warn' dev_warn(info->dev, ^~~~~~~~ /kisskb/src/drivers/video/fbdev/fsl-diu-fb.c:1290:2: note: here case MFB_SET_PIXFMT: ^~~~ In file included from /kisskb/src/include/linux/acpi.h:15, from /kisskb/src/include/linux/i2c.h:13, from /kisskb/src/include/uapi/linux/fb.h:6, from /kisskb/src/include/linux/fb.h:6, from /kisskb/src/drivers/video/fbdev/fsl-diu-fb.c:20: /kisskb/src/include/linux/device.h:1776:2: warning: this statement may fall through [-Wimplicit-fallthrough=] _dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/drivers/video/fbdev/fsl-diu-fb.c:1296:3: note: in expansion of macro 'dev_warn' dev_warn(info->dev, ^~~~~~~~ /kisskb/src/drivers/video/fbdev/fsl-diu-fb.c:1299:2: note: here case MFB_GET_PIXFMT: ^~~~ /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8541cds.dts:330.3-21: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0) /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8555cds.dts:330.3-21: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0) INFO: Uncompressed kernel (size 0xe5f804) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe5f804) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe5f804) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe5f804) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe5f804) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe5f804) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe5f804) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe5f804) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe5f804) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe5f804) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe5f804) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe5f804) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe5f804) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe5f804) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe5f804) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe4f000) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) Image Name: Linux-5.5.0-rc1-g679b68c4e865 Created: Thu Dec 12 01:26:09 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6724551 Bytes = 6566.94 KiB = 6.41 MiB Load Address: 00000000 Entry Point: 00000000 Image Name: Linux-5.5.0-rc1-g679b68c4e865 Created: Thu Dec 12 01:26:09 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6760261 Bytes = 6601.82 KiB = 6.45 MiB Load Address: 00f00000 Entry Point: 00f00314 Image Name: Linux-5.5.0-rc1-g679b68c4e865 Created: Thu Dec 12 01:26:09 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6759885 Bytes = 6601.45 KiB = 6.45 MiB Load Address: 00f00000 Entry Point: 00f00314 Image Name: Linux-5.5.0-rc1-g679b68c4e865 Created: Thu Dec 12 01:26:09 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6760237 Bytes = 6601.79 KiB = 6.45 MiB Load Address: 00f00000 Entry Point: 00f002b4 Image Name: Linux-5.5.0-rc1-g679b68c4e865 Created: Thu Dec 12 01:26:09 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6760086 Bytes = 6601.65 KiB = 6.45 MiB Load Address: 00f00000 Entry Point: 00f002b4 Image Name: Linux-5.5.0-rc1-g679b68c4e865 Created: Thu Dec 12 01:26:09 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6760235 Bytes = 6601.79 KiB = 6.45 MiB Load Address: 00f00000 Entry Point: 00f00314 Image Name: Linux-5.5.0-rc1-g679b68c4e865 Created: Thu Dec 12 01:26:09 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6752412 Bytes = 6594.15 KiB = 6.44 MiB Load Address: 00f00000 Entry Point: 00f002b4 Image Name: Linux-5.5.0-rc1-g679b68c4e865 Created: Thu Dec 12 01:26:09 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6759885 Bytes = 6601.45 KiB = 6.45 MiB Load Address: 00f00000 Entry Point: 00f00314 Image Name: Linux-5.5.0-rc1-g679b68c4e865 Created: Thu Dec 12 01:26:09 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6759952 Bytes = 6601.52 KiB = 6.45 MiB Load Address: 00f00000 Entry Point: 00f002b4 Image Name: Linux-5.5.0-rc1-g679b68c4e865 Created: Thu Dec 12 01:26:09 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6759155 Bytes = 6600.74 KiB = 6.45 MiB Load Address: 00f00000 Entry Point: 00f002b4 Image Name: Linux-5.5.0-rc1-g679b68c4e865 Created: Thu Dec 12 01:26:09 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6760090 Bytes = 6601.65 KiB = 6.45 MiB Load Address: 00f00000 Entry Point: 00f002b4 Image Name: Linux-5.5.0-rc1-g679b68c4e865 Created: Thu Dec 12 01:26:09 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6759143 Bytes = 6600.73 KiB = 6.45 MiB Load Address: 00f00000 Entry Point: 00f002b4 Image Name: Linux-5.5.0-rc1-g679b68c4e865 Created: Thu Dec 12 01:26:10 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6752761 Bytes = 6594.49 KiB = 6.44 MiB Load Address: 00f00000 Entry Point: 00f002b4 Image Name: Linux-5.5.0-rc1-g679b68c4e865 Created: Thu Dec 12 01:26:10 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6753751 Bytes = 6595.46 KiB = 6.44 MiB Load Address: 00f00000 Entry Point: 00f002b4 Image Name: Linux-5.5.0-rc1-g679b68c4e865 Created: Thu Dec 12 01:26:10 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6760014 Bytes = 6601.58 KiB = 6.45 MiB Load Address: 00f00000 Entry Point: 00f002b4 Image Name: Linux-5.5.0-rc1-g679b68c4e865 Created: Thu Dec 12 01:26:10 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6759883 Bytes = 6601.45 KiB = 6.45 MiB Load Address: 00f00000 Entry Point: 00f00314 Completed OK # rm -rf /kisskb/build/powerpc-fixes_mpc85xx_defconfig+KVM_powerpc-gcc8 # Build took: 0:02:43.623397