mm: move mm counter updating out of set_pte_range()
authorKefeng Wang <wangkefeng.wang@huawei.com>
Fri, 12 Apr 2024 06:47:50 +0000 (14:47 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 6 May 2024 00:53:36 +0000 (17:53 -0700)
commit1f2d8b4421bd0da2c97fb8bad5cc85fc929fef64
tree0deecdcd97f749e1cb844fc2bcc5cccb29abeec9
parenta14421ae2a99378c4103bb03606465ab13e75509
mm: move mm counter updating out of set_pte_range()

Patch series "mm: batch mm counter updating in filemap_map_pages()", v3.

Let's batch mm counter updating to accelerate filemap_map_pages().

This patch (of 2):

In order to support batch mm counter updating in filemap_map_pages(), move
mm counter updating out of set_pte_range(), the folios are file from
filemap, and distinguish folios by vmf->flags and vma->vm_flags from
another caller finish_fault().

Link: https://lkml.kernel.org/r/20240412064751.119015-1-wangkefeng.wang@huawei.com
Link: https://lkml.kernel.org/r/20240412064751.119015-2-wangkefeng.wang@huawei.com
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/filemap.c
mm/memory.c