Re: [PATCH 4/8] x86/asm: add clear_page_nt()

2020-10-14 Thread Ankur Arora
On 2020-10-14 12:56 p.m., Borislav Petkov wrote: On Wed, Oct 14, 2020 at 01:32:55AM -0700, Ankur Arora wrote: This can potentially improve page-clearing bandwidth (see below for performance numbers for two microarchitectures where it helps and one where it doesn't) and can help indirectly by con

Re: [PATCH 4/8] x86/asm: add clear_page_nt()

2020-10-14 Thread Borislav Petkov
On Wed, Oct 14, 2020 at 01:32:55AM -0700, Ankur Arora wrote: > This can potentially improve page-clearing bandwidth (see below for > performance numbers for two microarchitectures where it helps and one > where it doesn't) and can help indirectly by consuming less cache > resources. > > Any perfor

[PATCH 4/8] x86/asm: add clear_page_nt()

2020-10-14 Thread Ankur Arora
Add clear_page_nt() which is essentially an unrolled MOVNTI loop. The unrolling keeps the inner loop similar to memset_movnti() which can be exercised via perf bench mem memset. The caller needs to execute an SFENCE when done. MOVNTI, from the Intel SDM, Volume 2B, 4-101: "The non-temporal hint