diff options
author | 2020-12-14 19:05:48 -0800 | |
---|---|---|
committer | 2020-12-15 12:13:39 -0800 | |
commit | 52650c8b466bac399aec213c61d74bfe6f7af1a4 (patch) | |
tree | 25225c1f622dca2e05cfa3cfbbc4c262305ccda0 /mm/vmscan.c | |
parent | mm/gup: prevent gup_fast from racing with COW during fork (diff) | |
download | wireguard-linux-52650c8b466bac399aec213c61d74bfe6f7af1a4.tar.xz wireguard-linux-52650c8b466bac399aec213c61d74bfe6f7af1a4.zip |
mm/gup: remove the vma allocation from gup_longterm_locked()
Long ago there wasn't a FOLL_LONGTERM flag so this DAX check was done by
post-processing the VMA list.
These days it is trivial to just check each VMA to see if it is DAX before
processing it inside __get_user_pages() and return failure if a DAX VMA is
encountered with FOLL_LONGTERM.
Removing the allocation of the VMA list is a significant speed up for many
call sites.
Add an IS_ENABLED to vma_is_fsdax so that code generation is unchanged
when DAX is compiled out.
Remove the dummy version of __gup_longterm_locked() as !CONFIG_CMA already
makes memalloc_nocma_save(), check_and_migrate_cma_pages(), and
memalloc_nocma_restore() into a NOP.
Link: https://lkml.kernel.org/r/0-v1-5551df3ed12e+b8-gup_dax_speedup_jgg@nvidia.com
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Pavel Tatashin <pasha.tatashin@soleen.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmscan.c')
0 files changed, 0 insertions, 0 deletions