On Thu, 5 Nov 2026 21:18:19 -0800 Andrew Morton <[email protected]> wrote:
> I'm attempting to runtime test this on local LLM-driven live kernel > test setup, but it keeps on kicking me out and calling me a > cybercriminal. Sigh. Giving up Success. tl;dr: all seems good. The expected performance gains and losses were observed. Can't performance-test powerpc because the unpatched kernels crashed due to the bug the series fixes. : I tested the four v5 patches and the selftest fix on matched x86-64 : kernels. Both shmem fork tests passed with the series and skipped on : the pre-series kernel, as expected. They checked inherited PMDs, : private and shared writes, parent mappings and ShmemPmdMapped after : child exit. : : The special-PMD race was reproduced with a virtual QXL device mapped : through VFIO. Revocation before fork produced SIGBUS on both kernels. : When revocation completed during a controlled pause in fork, the child : accessed the revoked mapping before the series and received SIGBUS with : the series. Both pauses were reached without timing out. No BUG, : WARNING, KASAN report or oops appeared in these x86-64 runs. : : I also built matched PowerPC kernels and tested a POWER9/pseries : hash-MMU guest under software emulation: two vCPUs, 2 GiB RAM, 64 KiB : base pages and 16 MiB PMDs. A trace confirmed order-8 VFIO PMD : insertion from a 64 MiB virtual PCI shared-memory BAR. On the : pre-series kernel, the child's first access after fork caused a NULL : pointer dereference in __hash_page_thp() and a soft lockup; that guest : required a bounded timeout. With the series, the child read and exited : normally. Revocation before fork gave the child SIGBUS with the series. : This is one comparison, not a PowerPC stress test. : : I measured fork costs with a 512 MiB private shmem mapping, including : 510 MiB actually mapped with PMDs. Median times from 100 forks per : condition on each x86-64 kernel, following five warmups: : : Before With series : fork only 49 us 63 us : fork through child exit, : no child reads 132 us 202 us : fork through child exit, : one read per PMD 637 us 326 us : : This workload pays more at fork and takes about half as long end-to-end : when the child reads every PMD. These are single-boot measurements, not : a broader performance characterization. The timing kernels had KASAN, : lockdep and DEBUG_VM disabled; the correctness kernels had them enabled. : The x86-64 KVM guests had 8 GiB, four vCPUs (one virtual socket, four : single-threaded virtual cores) and one virtual NUMA node. The host has : 64 physical cores and 128 SMT threads on one physical NUMA node; : individual vCPUs were not pinned. : : I attempted a PowerPC VFIO fork-only timing comparison. The pre-series : kernel faulted on the first child exit, even without a child read, and : the guest was stopped after a 90-second timeout. The patched kernel : completed 100 fork/exit operations, averaging 2.77 ms under software : emulation with tracing enabled. There is no matched PowerPC performance : comparison. : : Tested-by: Andrew Morton <[email protected]>
