Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yet more atomics & cache-line fixes on work-stealing queue (#53424)
This regression at a large number of GC threads still shows up on a large aarch64 machine (80-core ARM Neoverse N1). ``` bench = "many_refs.jl" (gcthreads, threads) = (1, 1) [ Info: Setting GC memory pressure callback [ Info: Setting GC memory pressure callback [ Info: Setting GC memory pressure callback βββββββββββ¬βββββββββββββ¬ββββββββββ¬ββββββββββββ¬βββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββ¬βββββββββββ¬βββββββββββββ β β total time β gc time β mark time β sweep time β max GC pause β time to safepoint β max heap β percent gc β β β ms β ms β ms β ms β ms β us β MB β % β βββββββββββΌβββββββββββββΌββββββββββΌββββββββββββΌβββββββββββββΌβββββββββββββββΌββββββββββββββββββββΌβββββββββββΌβββββββββββββ€ β minimum β 3807 β 2826 β 2633 β 193 β 960 β 13 β 892 β 74 β β median β 3810 β 2826 β 2633 β 193 β 961 β 15 β 892 β 74 β β maximum β 3810 β 2831 β 2638 β 193 β 962 β 27 β 892 β 74 β β stdev β 2 β 3 β 3 β 0 β 1 β 7 β 0 β 0 β βββββββββββ΄βββββββββββββ΄ββββββββββ΄ββββββββββββ΄βββββββββββββ΄βββββββββββββββ΄ββββββββββββββββββββ΄βββββββββββ΄βββββββββββββ (gcthreads, threads) = (2, 1) [ Info: Setting GC memory pressure callback [ Info: Setting GC memory pressure callback [ Info: Setting GC memory pressure callback βββββββββββ¬βββββββββββββ¬ββββββββββ¬ββββββββββββ¬βββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββ¬βββββββββββ¬βββββββββββββ β β total time β gc time β mark time β sweep time β max GC pause β time to safepoint β max heap β percent gc β β β ms β ms β ms β ms β ms β us β MB β % β βββββββββββΌβββββββββββββΌββββββββββΌββββββββββββΌβββββββββββββΌβββββββββββββββΌββββββββββββββββββββΌβββββββββββΌβββββββββββββ€ β minimum β 2455 β 1476 β 1350 β 126 β 488 β 20 β 892 β 60 β β median β 2459 β 1478 β 1352 β 126 β 489 β 23 β 892 β 60 β β maximum β 2465 β 1479 β 1352 β 126 β 489 β 23 β 893 β 60 β β stdev β 5 β 1 β 1 β 0 β 1 β 2 β 0 β 0 β βββββββββββ΄βββββββββββββ΄ββββββββββ΄ββββββββββββ΄βββββββββββββ΄βββββββββββββββ΄ββββββββββββββββββββ΄βββββββββββ΄βββββββββββββ (gcthreads, threads) = (4, 1) [ Info: Setting GC memory pressure callback [ Info: Setting GC memory pressure callback [ Info: Setting GC memory pressure callback βββββββββββ¬βββββββββββββ¬ββββββββββ¬ββββββββββββ¬βββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββ¬βββββββββββ¬βββββββββββββ β β total time β gc time β mark time β sweep time β max GC pause β time to safepoint β max heap β percent gc β β β ms β ms β ms β ms β ms β us β MB β % β βββββββββββΌβββββββββββββΌββββββββββΌββββββββββββΌβββββββββββββΌβββββββββββββββΌββββββββββββββββββββΌβββββββββββΌβββββββββββββ€ β minimum β 2173 β 1194 β 1115 β 77 β 463 β 18 β 892 β 54 β β median β 2187 β 1194 β 1116 β 78 β 463 β 19 β 893 β 55 β β maximum β 2217 β 1208 β 1130 β 78 β 463 β 19 β 893 β 55 β β stdev β 22 β 8 β 8 β 1 β 0 β 1 β 0 β 0 β βββββββββββ΄βββββββββββββ΄ββββββββββ΄ββββββββββββ΄βββββββββββββ΄βββββββββββββββ΄ββββββββββββββββββββ΄βββββββββββ΄βββββββββββββ (gcthreads, threads) = (8, 1) [ Info: Setting GC memory pressure callback [ Info: Setting GC memory pressure callback [ Info: Setting GC memory pressure callback βββββββββββ¬βββββββββββββ¬ββββββββββ¬ββββββββββββ¬βββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββ¬βββββββββββ¬βββββββββββββ β β total time β gc time β mark time β sweep time β max GC pause β time to safepoint β max heap β percent gc β β β ms β ms β ms β ms β ms β us β MB β % β βββββββββββΌβββββββββββββΌββββββββββΌββββββββββββΌβββββββββββββΌβββββββββββββββΌββββββββββββββββββββΌβββββββββββΌβββββββββββββ€ β minimum β 2191 β 1212 β 1149 β 63 β 539 β 19 β 901 β 55 β β median β 2199 β 1219 β 1156 β 63 β 540 β 20 β 901 β 55 β β maximum β 2201 β 1222 β 1157 β 65 β 540 β 20 β 901 β 56 β β stdev β 5 β 5 β 4 β 1 β 1 β 1 β 0 β 0 β βββββββββββ΄βββββββββββββ΄ββββββββββ΄ββββββββββββ΄βββββββββββββ΄βββββββββββββββ΄ββββββββββββββββββββ΄βββββββββββ΄βββββββββββββ (gcthreads, threads) = (16, 1) [ Info: Setting GC memory pressure callback [ Info: Setting GC memory pressure callback [ Info: Setting GC memory pressure callback βββββββββββ¬βββββββββββββ¬ββββββββββ¬ββββββββββββ¬βββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββ¬βββββββββββ¬βββββββββββββ β β total time β gc time β mark time β sweep time β max GC pause β time to safepoint β max heap β percent gc β β β ms β ms β ms β ms β ms β us β MB β % β βββββββββββΌβββββββββββββΌββββββββββΌββββββββββββΌβββββββββββββΌβββββββββββββββΌββββββββββββββββββββΌβββββββββββΌβββββββββββββ€ β minimum β 3897 β 2916 β 2854 β 60 β 1423 β 20 β 902 β 75 β β median β 4012 β 3032 β 2972 β 62 β 1491 β 21 β 904 β 75 β β maximum β 4026 β 3106 β 3044 β 62 β 1511 β 22 β 904 β 77 β β stdev β 70 β 96 β 96 β 1 β 46 β 1 β 1 β 1 β βββββββββββ΄βββββββββββββ΄ββββββββββ΄ββββββββββββ΄βββββββββββββ΄βββββββββββββββ΄ββββββββββββββββββββ΄βββββββββββ΄βββββββββββββ ``` This patch seems to improve performance at 16 GC threads though we still have some negative scaling for this benchmark beyond 8 GC threads (others seem fine). I didn't test whether this is indeed the optimal struct layout for the queue in this benchmark. ``` bench = "many_refs.jl" (gcthreads, threads) = (1, 1) [ Info: Setting GC memory pressure callback [ Info: Setting GC memory pressure callback [ Info: Setting GC memory pressure callback βββββββββββ¬βββββββββββββ¬ββββββββββ¬ββββββββββββ¬βββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββ¬βββββββββββ¬βββββββββββββ β β total time β gc time β mark time β sweep time β max GC pause β time to safepoint β max heap β percent gc β β β ms β ms β ms β ms β ms β us β MB β % β βββββββββββΌβββββββββββββΌββββββββββΌββββββββββββΌβββββββββββββΌβββββββββββββββΌββββββββββββββββββββΌβββββββββββΌβββββββββββββ€ β minimum β 3807 β 2822 β 2630 β 193 β 959 β 15 β 892 β 74 β β median β 3824 β 2823 β 2630 β 193 β 959 β 15 β 892 β 74 β β maximum β 4307 β 3194 β 2974 β 220 β 1086 β 19 β 892 β 74 β β stdev β 284 β 215 β 199 β 16 β 74 β 2 β 0 β 0 β βββββββββββ΄βββββββββββββ΄ββββββββββ΄ββββββββββββ΄βββββββββββββ΄βββββββββββββββ΄ββββββββββββββββββββ΄βββββββββββ΄βββββββββββββ (gcthreads, threads) = (2, 1) [ Info: Setting GC memory pressure callback [ Info: Setting GC memory pressure callback [ Info: Setting GC memory pressure callback βββββββββββ¬βββββββββββββ¬ββββββββββ¬ββββββββββββ¬βββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββ¬βββββββββββ¬βββββββββββββ β β total time β gc time β mark time β sweep time β max GC pause β time to safepoint β max heap β percent gc β β β ms β ms β ms β ms β ms β us β MB β % β βββββββββββΌβββββββββββββΌββββββββββΌββββββββββββΌβββββββββββββΌβββββββββββββββΌββββββββββββββββββββΌβββββββββββΌβββββββββββββ€ β minimum β 2459 β 1476 β 1349 β 126 β 488 β 19 β 892 β 60 β β median β 2460 β 1479 β 1352 β 127 β 488 β 21 β 893 β 60 β β maximum β 2770 β 1661 β 1526 β 135 β 570 β 22 β 893 β 60 β β stdev β 179 β 106 β 101 β 5 β 47 β 1 β 0 β 0 β βββββββββββ΄βββββββββββββ΄ββββββββββ΄ββββββββββββ΄βββββββββββββ΄βββββββββββββββ΄ββββββββββββββββββββ΄βββββββββββ΄βββββββββββββ (gcthreads, threads) = (4, 1) [ Info: Setting GC memory pressure callback [ Info: Setting GC memory pressure callback [ Info: Setting GC memory pressure callback βββββββββββ¬βββββββββββββ¬ββββββββββ¬ββββββββββββ¬βββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββ¬βββββββββββ¬βββββββββββββ β β total time β gc time β mark time β sweep time β max GC pause β time to safepoint β max heap β percent gc β β β ms β ms β ms β ms β ms β us β MB β % β βββββββββββΌβββββββββββββΌββββββββββΌββββββββββββΌβββββββββββββΌβββββββββββββββΌββββββββββββββββββββΌβββββββββββΌβββββββββββββ€ β minimum β 2215 β 1233 β 1155 β 77 β 485 β 20 β 892 β 53 β β median β 2320 β 1248 β 1171 β 78 β 492 β 21 β 893 β 54 β β maximum β 2372 β 1259 β 1176 β 83 β 493 β 22 β 893 β 56 β β stdev β 80 β 13 β 11 β 3 β 5 β 1 β 1 β 1 β βββββββββββ΄βββββββββββββ΄ββββββββββ΄ββββββββββββ΄βββββββββββββ΄βββββββββββββββ΄ββββββββββββββββββββ΄βββββββββββ΄βββββββββββββ (gcthreads, threads) = (8, 1) [ Info: Setting GC memory pressure callback [ Info: Setting GC memory pressure callback [ Info: Setting GC memory pressure callback βββββββββββ¬βββββββββββββ¬ββββββββββ¬ββββββββββββ¬βββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββ¬βββββββββββ¬βββββββββββββ β β total time β gc time β mark time β sweep time β max GC pause β time to safepoint β max heap β percent gc β β β ms β ms β ms β ms β ms β us β MB β % β βββββββββββΌβββββββββββββΌββββββββββΌββββββββββββΌβββββββββββββΌβββββββββββββββΌββββββββββββββββββββΌβββββββββββΌβββββββββββββ€ β minimum β 2204 β 1220 β 1156 β 64 β 544 β 23 β 901 β 53 β β median β 2362 β 1249 β 1181 β 64 β 553 β 23 β 901 β 53 β β maximum β 2374 β 1261 β 1196 β 68 β 558 β 25 β 901 β 55 β β stdev β 95 β 21 β 20 β 2 β 7 β 1 β 0 β 1 β βββββββββββ΄βββββββββββββ΄ββββββββββ΄ββββββββββββ΄βββββββββββββ΄βββββββββββββββ΄ββββββββββββββββββββ΄βββββββββββ΄βββββββββββββ (gcthreads, threads) = (16, 1) [ Info: Setting GC memory pressure callback [ Info: Setting GC memory pressure callback [ Info: Setting GC memory pressure callback βββββββββββ¬βββββββββββββ¬ββββββββββ¬ββββββββββββ¬βββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββ¬βββββββββββ¬βββββββββββββ β β total time β gc time β mark time β sweep time β max GC pause β time to safepoint β max heap β percent gc β β β ms β ms β ms β ms β ms β us β MB β % β βββββββββββΌβββββββββββββΌββββββββββΌββββββββββββΌβββββββββββββΌβββββββββββββββΌββββββββββββββββββββΌβββββββββββΌβββββββββββββ€ β minimum β 2502 β 1519 β 1458 β 62 β 721 β 22 β 902 β 58 β β median β 2511 β 1524 β 1461 β 63 β 728 β 23 β 903 β 61 β β maximum β 2664 β 1554 β 1486 β 68 β 741 β 25 β 905 β 61 β β stdev β 91 β 19 β 16 β 3 β 10 β 1 β 2 β 1 β βββββββββββ΄βββββββββββββ΄ββββββββββ΄ββββββββββββ΄βββββββββββββ΄βββββββββββββββ΄ββββββββββββββββββββ΄βββββββββββ΄βββββββββββββ ``` (cherry picked from commit 973b4ff)
- Loading branch information