In Shenandoah pretouching code, we have a kludge for pre-touching heap under THP: https://github.com/openjdk/jdk/blob/c34a1b7013b27a8a214f63387bd528a90342a416/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp#L391-L399
That kludge is counter-productive after JDK-8272807, as JDK-8315923 mentions. The fix for JDK-8315923 enables os::pretouch_memory to use the bulk `madvise`, and it has the fallback for small pages: https://github.com/openjdk/jdk/blob/c34a1b7013b27a8a214f63387bd528a90342a416/src/hotspot/os/linux/os_linux.cpp#L3054-L3070
The Shenandoah code should be reconciled with the improvements brought by JDK-8315923.