diff options
author | Yin Fengwei <fengwei.yin@intel.com> | 2023-08-02 17:14:04 +0200 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-08-25 01:20:26 +0200 |
commit | 3bd786f76de2e01745f462844fd1a206052ee8b8 (patch) | |
tree | 235d513d3ad2d939fd00280fed415ecbac2eec1b /mm/filemap.c | |
parent | rmap: add folio_add_file_rmap_range() (diff) | |
download | linux-3bd786f76de2e01745f462844fd1a206052ee8b8.tar.xz linux-3bd786f76de2e01745f462844fd1a206052ee8b8.zip |
mm: convert do_set_pte() to set_pte_range()
set_pte_range() allows to setup page table entries for a specific
range. It takes advantage of batched rmap update for large folio.
It now takes care of calling update_mmu_cache_range().
Link: https://lkml.kernel.org/r/20230802151406.3735276-37-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 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index bdc1e0b811bf..c06e9d331416 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -3501,8 +3501,7 @@ static vm_fault_t filemap_map_folio_range(struct vm_fault *vmf, ret = VM_FAULT_NOPAGE; ref_count++; - do_set_pte(vmf, page, addr); - update_mmu_cache(vma, addr, vmf->pte); + set_pte_range(vmf, folio, page, 1, addr); } while (vmf->pte++, page++, addr += PAGE_SIZE, ++count < nr_pages); /* Restore the vmf->pte */ |