[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20250807155401.683c77b0d0cb5c9ec88089e6@linux-foundation.org>
Date: Thu, 7 Aug 2025 15:54:01 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Peter Xu <peterx@...hat.com>
Cc: Lokesh Gidra <lokeshgidra@...gle.com>, aarcange@...hat.com,
linux-mm@...ck.org, linux-kernel@...r.kernel.org, 21cnbao@...il.com,
ngeoffray@...gle.com, Suren Baghdasaryan <surenb@...gle.com>, Kalesh Singh
<kaleshsingh@...gle.com>, Barry Song <v-songbaohua@...o.com>, David
Hildenbrand <david@...hat.com>
Subject: Re: [PATCH v3] userfaultfd: opportunistic TLB-flush batching for
present pages in MOVE
On Thu, 7 Aug 2025 15:16:57 -0400 Peter Xu <peterx@...hat.com> wrote:
> Hi, Lokesh,
>
> On Thu, Aug 07, 2025 at 03:39:02AM -0700, Lokesh Gidra wrote:
> > MOVE ioctl's runtime is dominated by TLB-flush cost, which is required
> > for moving present pages. Mitigate this cost by opportunistically
> > batching present contiguous pages for TLB flushing.
> >
> > Without batching, in our testing on an arm64 Android device with UFFD GC,
> > which uses MOVE ioctl for compaction, we observed that out of the total
> > time spent in move_pages_pte(), over 40% is in ptep_clear_flush(), and
> > ~20% in vm_normal_folio().
> >
> > With batching, the proportion of vm_normal_folio() increases to over
> > 70% of move_pages_pte() without any changes to vm_normal_folio().
>
> Do you know why vm_normal_folio() could be expensive? I still see quite
> some other things this path needs to do.
Maybe as explained here?
https://lkml.kernel.org/r/20250807185819.199865-1-lorenzo.stoakes@oracle.com
Powered by blists - more mailing lists