# git gc Expanding reachable commits in commit graph: 50948 Expanding reachable commits in commit graph: 104735 Expanding reachable commits in commit graph: 158462 Expanding reachable commits in commit graph: 215207 Expanding reachable commits in commit graph: 267263 Expanding reachable commits in commit graph: 323916 Expanding reachable commits in commit graph: 381799 Expanding reachable commits in commit graph: 440108 Expanding reachable commits in commit graph: 499347 Expanding reachable commits in commit graph: 550003 Expanding reachable commits in commit graph: 610794 Expanding reachable commits in commit graph: 672750 Expanding reachable commits in commit graph: 734643 Expanding reachable commits in commit graph: 798644 Expanding reachable commits in commit graph: 864361 Expanding reachable commits in commit graph: 930826 Expanding reachable commits in commit graph: 997314 Expanding reachable commits in commit graph: 1054580 Expanding reachable commits in commit graph: 1113369 Expanding reachable commits in commit graph: 1184349 Expanding reachable commits in commit graph: 1215405, done. Finding extra edges in commit graph: 65% (794104/1215405) Finding extra edges in commit graph: 66% (802168/1215405) Finding extra edges in commit graph: 67% (814322/1215405) Finding extra edges in commit graph: 68% (826476/1215405) Finding extra edges in commit graph: 69% (838630/1215405) Finding extra edges in commit graph: 70% (850784/1215405) Finding extra edges in commit graph: 71% (862938/1215405) Finding extra edges in commit graph: 72% (875092/1215405) Finding extra edges in commit graph: 73% (887246/1215405) Finding extra edges in commit graph: 74% (899400/1215405) Finding extra edges in commit graph: 75% (911554/1215405) Finding extra edges in commit graph: 76% (923708/1215405) Finding extra edges in commit graph: 77% (935862/1215405) Finding extra edges in commit graph: 78% (948016/1215405) Finding extra edges in commit graph: 79% (960170/1215405) Finding extra edges in commit graph: 80% (972324/1215405) Finding extra edges in commit graph: 81% (984479/1215405) Finding extra edges in commit graph: 82% (996633/1215405) Finding extra edges in commit graph: 83% (1008787/1215405) Finding extra edges in commit graph: 84% (1020941/1215405) Finding extra edges in commit graph: 85% (1033095/1215405) Finding extra edges in commit graph: 86% (1045249/1215405) Finding extra edges in commit graph: 87% (1057403/1215405) Finding extra edges in commit graph: 88% (1069557/1215405) Finding extra edges in commit graph: 89% (1081711/1215405) Finding extra edges in commit graph: 90% (1093865/1215405) Finding extra edges in commit graph: 91% (1106019/1215405) Finding extra edges in commit graph: 92% (1118173/1215405) Finding extra edges in commit graph: 93% (1130327/1215405) Finding extra edges in commit graph: 94% (1142481/1215405) Finding extra edges in commit graph: 95% (1154635/1215405) Finding extra edges in commit graph: 96% (1166789/1215405) Finding extra edges in commit graph: 97% (1178943/1215405) Finding extra edges in commit graph: 98% (1191097/1215405) Finding extra edges in commit graph: 99% (1203251/1215405) Finding extra edges in commit graph: 100% (1215405/1215405) Finding extra edges in commit graph: 100% (1215405/1215405), done. Writing out commit graph in 4 passes: 54% (2654426/4861620) Writing out commit graph in 4 passes: 55% (2673891/4861620) Writing out commit graph in 4 passes: 56% (2722508/4861620) Writing out commit graph in 4 passes: 57% (2771124/4861620) Writing out commit graph in 4 passes: 58% (2819740/4861620) Writing out commit graph in 4 passes: 59% (2868356/4861620) Writing out commit graph in 4 passes: 60% (2916972/4861620) Writing out commit graph in 4 passes: 61% (2965589/4861620) Writing out commit graph in 4 passes: 61% (2982581/4861620) Writing out commit graph in 4 passes: 62% (3014205/4861620) Writing out commit graph in 4 passes: 63% (3062821/4861620) Writing out commit graph in 4 passes: 64% (3111437/4861620) Writing out commit graph in 4 passes: 65% (3160053/4861620) Writing out commit graph in 4 passes: 66% (3208670/4861620) Writing out commit graph in 4 passes: 67% (3257286/4861620) Writing out commit graph in 4 passes: 68% (3305902/4861620) Writing out commit graph in 4 passes: 68% (3310852/4861620) Writing out commit graph in 4 passes: 69% (3354518/4861620) Writing out commit graph in 4 passes: 70% (3403134/4861620) Writing out commit graph in 4 passes: 71% (3451751/4861620) Writing out commit graph in 4 passes: 72% (3500367/4861620) Writing out commit graph in 4 passes: 73% (3548983/4861620) Writing out commit graph in 4 passes: 74% (3597599/4861620) Writing out commit graph in 4 passes: 74% (3638784/4861620) Writing out commit graph in 4 passes: 75% (3646215/4861620) Writing out commit graph in 4 passes: 76% (3694832/4861620) Writing out commit graph in 4 passes: 77% (3743448/4861620) Writing out commit graph in 4 passes: 78% (3792064/4861620) Writing out commit graph in 4 passes: 79% (3840680/4861620) Writing out commit graph in 4 passes: 80% (3889296/4861620) Writing out commit graph in 4 passes: 81% (3937913/4861620) Writing out commit graph in 4 passes: 82% (3986529/4861620) Writing out commit graph in 4 passes: 83% (4035145/4861620) Writing out commit graph in 4 passes: 84% (4083761/4861620) Writing out commit graph in 4 passes: 85% (4132377/4861620) Writing out commit graph in 4 passes: 86% (4180994/4861620) Writing out commit graph in 4 passes: 87% (4229610/4861620) Writing out commit graph in 4 passes: 88% (4278226/4861620) Writing out commit graph in 4 passes: 89% (4326842/4861620) Writing out commit graph in 4 passes: 90% (4375458/4861620) Writing out commit graph in 4 passes: 91% (4424075/4861620) Writing out commit graph in 4 passes: 92% (4472691/4861620) Writing out commit graph in 4 passes: 93% (4521307/4861620) Writing out commit graph in 4 passes: 94% (4569923/4861620) Writing out commit graph in 4 passes: 95% (4618539/4861620) Writing out commit graph in 4 passes: 96% (4667156/4861620) Writing out commit graph in 4 passes: 97% (4715772/4861620) Writing out commit graph in 4 passes: 98% (4764388/4861620) Writing out commit graph in 4 passes: 99% (4813004/4861620) Writing out commit graph in 4 passes: 100% (4861620/4861620) Writing out commit graph in 4 passes: 100% (4861620/4861620), done. # git rev-parse -q --verify f9bc9bbe8afdf83412728f0b464979a72a3b9ec2^{commit} f9bc9bbe8afdf83412728f0b464979a72a3b9ec2 already have revision, skipping fetch # git checkout -q -f -B kisskb f9bc9bbe8afdf83412728f0b464979a72a3b9ec2 # git clean -qxdf # < git log -1 # commit f9bc9bbe8afdf83412728f0b464979a72a3b9ec2 # Author: Nicholas Piggin # Date: Mon Oct 16 22:43:00 2023 +1000 # # powerpc/qspinlock: Fix stale propagated yield_cpu # # yield_cpu is a sample of a preempted lock holder that gets propagated # back through the queue. Queued waiters use this to yield to the # preempted lock holder without continually sampling the lock word (which # would defeat the purpose of MCS queueing by bouncing the cache line). # # The problem is that yield_cpu can become stale. It can take some time to # be passed down the chain, and if any queued waiter gets preempted then # it will cease to propagate the yield_cpu to later waiters. # # This can result in yielding to a CPU that no longer holds the lock, # which is bad, but particularly if it is currently in H_CEDE (idle), # then it appears to be preempted and some hypervisors (PowerVM) can # cause very long H_CONFER latencies waiting for H_CEDE wakeup. This # results in latency spikes and hard lockups on oversubscribed # partitions with lock contention. # # This is a minimal fix. Before yielding to yield_cpu, sample the lock # word to confirm yield_cpu is still the owner, and bail out of it is not. # # Thanks to a bunch of people who reported this and tracked down the # exact problem using tracepoints and dispatch trace logs. # # Fixes: 28db61e207ea ("powerpc/qspinlock: allow propagation of yield CPU down the queue") # Cc: stable@vger.kernel.org # v6.2+ # Reported-by: Srikar Dronamraju # Reported-by: Laurent Dufour # Reported-by: Shrikanth Hegde # Debugged-by: "Nysal Jan K.A" # Signed-off-by: Nicholas Piggin # Tested-by: Shrikanth Hegde # Signed-off-by: Michael Ellerman # Link: https://msgid.link/20231016124305.139923-2-npiggin@gmail.com # < /opt/cross/kisskb/korg/gcc-13.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-13.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 f9bc9bbe8afdf83412728f0b464979a72a3b9ec2 # make -s -j 24 ARCH=powerpc O=/kisskb/build/powerpc-fixes_ppc64_defconfig+NO_TM_powerpc-gcc13 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-13.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- ppc64_defconfig # Added to kconfig CONFIG_PPC_TRANSACTIONAL_MEM=n # < make -s -j 24 ARCH=powerpc O=/kisskb/build/powerpc-fixes_ppc64_defconfig+NO_TM_powerpc-gcc13 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-13.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 24 ARCH=powerpc O=/kisskb/build/powerpc-fixes_ppc64_defconfig+NO_TM_powerpc-gcc13 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-13.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig # make -s -j 24 ARCH=powerpc O=/kisskb/build/powerpc-fixes_ppc64_defconfig+NO_TM_powerpc-gcc13 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-13.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- Completed OK # rm -rf /kisskb/build/powerpc-fixes_ppc64_defconfig+NO_TM_powerpc-gcc13 # Build took: 0:13:41.665961