Re: [PATCH v3 1/1] mm: do not increment pgfault stats when page fault handler retries

From: Peter Xu
Date: Wed Apr 19 2023 - 14:28:14 EST


On Wed, Apr 19, 2023 at 10:58:36AM -0700, Suren Baghdasaryan wrote:
> If the page fault handler requests a retry, we will count the fault
> multiple times. This is a relatively harmless problem as the retry paths
> are not often requested, and the only user-visible problem is that the
> fault counter will be slightly higher than it should be. Nevertheless,
> userspace only took one fault, and should not see the fact that the
> kernel had to retry the fault multiple times.
> Move page fault accounting into mm_account_fault() and skip incomplete
> faults which will be accounted upon completion.
>
> Fixes: d065bd810b6d ("mm: retry page fault when blocking on disk transfer")
> Signed-off-by: Suren Baghdasaryan <surenb@xxxxxxxxxx>

Acked-by: Peter Xu <peterx@xxxxxxxxxx>

--
Peter Xu