Re: [PATCH v2 2/2] mm/memory: reuse the whole exclusive large folio on a write fault

From: David Hildenbrand (Arm)

Date: Thu Sep 24 2026 - 15:56:10 EST


On 9/19/26 13:18, Yuan-Hao Hsu wrote:
> On Sat, 19 Sep 2026 12:10:56 +0200, David Hildenbrand (Arm) wrote:
>> Are you measuring the worst-case latency of a single write fault or only the
>> average over all writes?
>
> The single fault. Each store is timed by itself (clock_gettime()
> before and after), and the latency numbers come from a pattern where
> every store takes one of these faults (one store per folio), so there
> is nothing else in the average. The tables show the median of those
> faults; I also have p99 and max (i7-12700KF, in a VM, us):
>
> v7.3-rc3+ patched
> p50 p99 max p50 p99 max
> 64K, 1 fault 0.42 0.57 25-26 0.71-0.74 0.96-1.10 28-60
> 2M, 1 fault 0.50 0.67 0.7-1.2 10.0-10.2 12.2-15.8 13-22
>
> max is the slowest store of a run, median over 15 runs. The 25 us on
> the base kernel are interrupts; the VM has those on both sides. The
> 2M row is the worst case by construction, every one of those faults
> walks all 512 PTEs.

Thanks. See my other mail, we should focus on keeping the fault path as fast as
possible and minimizing the work in there.

--
Cheers,

David