summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYin Fengwei <fengwei.yin@intel.com>2023-08-02 18:14:03 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-08-25 02:20:26 +0300
commit86f35f69db8e7d169c36472a349507ab0a461f49 (patch)
tree72a38ed4748d5576a12bc29b08da0a50a6502c98 /include
parentde74976eb65151a2f568e477fc2e0032df5b22b4 (diff)
downloadlinux-86f35f69db8e7d169c36472a349507ab0a461f49.tar.xz
rmap: add folio_add_file_rmap_range()
folio_add_file_rmap_range() allows to add pte mapping to a specific range of file folio. Comparing to page_add_file_rmap(), it batched updates __lruvec_stat for large folio. Link: https://lkml.kernel.org/r/20230802151406.3735276-36-willy@infradead.org Signed-off-by: Yin Fengwei <fengwei.yin@intel.com> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/rmap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index b87d01660412..a3825ce81102 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -198,6 +198,8 @@ void folio_add_new_anon_rmap(struct folio *, struct vm_area_struct *,
unsigned long address);
void page_add_file_rmap(struct page *, struct vm_area_struct *,
bool compound);
+void folio_add_file_rmap_range(struct folio *, struct page *, unsigned int nr,
+ struct vm_area_struct *, bool compound);
void page_remove_rmap(struct page *, struct vm_area_struct *,
bool compound);