Files
linux/mm
Jason Gunthorpe f1f505f3b4 UPSTREAM: 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.

Bug: 209719897
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>
Signed-off-by: Minchan Kim <minchan@google.com>
(cherry picked from commit 52650c8b46)
Change-Id: I8be099dc7b617916254c2650ff8a55a6b926a32e
(cherry picked from commit 78ea29e570)
2021-12-09 19:43:20 +00:00
..
2021-06-04 11:15:16 -07:00
2021-04-30 09:13:34 -07:00
2021-11-26 15:31:49 +01:00
2021-06-30 19:29:52 +02:00
2021-03-25 19:20:09 +00:00
2021-11-06 14:21:25 +01:00
2021-05-20 15:35:25 +02:00
2021-04-30 09:13:34 -07:00
2021-07-28 15:22:59 +02:00
2021-11-19 07:47:18 +01:00
2021-06-30 19:29:52 +02:00
2021-02-25 19:36:38 +00:00
2021-11-19 07:47:18 +01:00
2021-09-12 09:16:05 +02:00
2021-04-30 09:13:34 -07:00
2021-04-15 14:23:41 +02:00
2021-04-22 11:12:08 +02:00
2021-06-30 19:29:52 +02:00
2021-07-25 15:35:50 +02:00
2021-05-15 09:28:55 +02:00
2021-11-26 15:31:49 +01:00
2021-10-27 10:46:26 +02:00
2021-10-06 17:32:06 +02:00
2021-09-18 13:59:45 +02:00
2021-11-19 07:47:18 +01:00