Hi Ingo, On 5/27/22, Ingo Molnar <mingo@xxxxxxxxxx> wrote: > > * Jason A. Donenfeld <Jason@xxxxxxxxx> wrote: > >> On Mon, May 23, 2022 at 10:03:45AM -0600, Jens Axboe wrote: >> > clear_user() >> > 32 ~96MB/sec >> > 64 195MB/sec >> > 128 386MB/sec >> > 1k 2.7GB/sec >> > 4k 7.8GB/sec >> > 16k 14.8GB/sec >> > >> > copy_from_zero_page() >> > 32 ~96MB/sec >> > 64 193MB/sec >> > 128 383MB/sec >> > 1k 2.9GB/sec >> > 4k 9.8GB/sec >> > 16k 21.8GB/sec >> >> Just FYI, on x86, Samuel Neves proposed some nice clear_user() >> performance improvements that were forgotten about: >> >> https://lore.kernel.org/lkml/20210523180423.108087-1-sneves@xxxxxxxxx/ >> https://lore.kernel.org/lkml/Yk9yBcj78mpXOOLL@xxxxxxxxx/ >> >> Hoping somebody picks this up at some point... > > Those ~2x speedup numbers are indeed looking very nice: > > | After this patch, on a Skylake CPU, these are the > | before/after figures: > | > | $ dd if=/dev/zero of=/dev/null bs=1024k status=progress > | 94402248704 bytes (94 GB, 88 GiB) copied, 6 s, 15.7 GB/s > | > | $ dd if=/dev/zero of=/dev/null bs=1024k status=progress > | 446476320768 bytes (446 GB, 416 GiB) copied, 15 s, 29.8 GB/s > > Patch fell through the cracks & it doesn't apply anymore: > > checking file arch/x86/lib/usercopy_64.c > Hunk #2 FAILED at 17. > 1 out of 2 hunks FAILED > > Would be nice to re-send it. I don't think Samuel is going to do that at this point, so I think it's probably best if you do it. Jason