Files
android_kernel_xiaomi_sm8450/include/linux
Jason Gunthorpe 78ea29e570 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 52650c8b466bac399aec213c61d74bfe6f7af1a4)
Change-Id: I8be099dc7b617916254c2650ff8a55a6b926a32e
2021-12-09 19:39:42 +00:00
..
2021-08-12 14:58:34 +02:00
2021-04-09 09:29:17 +02:00
2021-09-15 14:16:47 +02:00
2021-09-03 10:51:56 +02:00
2020-09-21 15:00:40 -07:00
2020-10-02 15:00:49 -07:00
2020-12-11 14:02:14 -08:00
2020-08-12 20:42:08 +02:00
2020-09-16 08:54:53 -05:00
2021-08-27 17:14:51 +02:00
2020-08-26 12:41:56 +02:00
2020-11-19 22:38:29 -05:00
2021-03-04 11:37:59 +01:00
2020-09-04 09:25:20 -07:00
2021-02-07 15:37:17 +01:00
2021-09-15 09:50:41 +02:00
2020-09-23 18:02:49 -07:00
2020-09-04 12:46:07 +01:00
2021-06-30 08:47:26 -04:00
2021-08-15 14:16:00 +02:00
2020-10-07 14:28:39 -04:00
2020-08-31 12:52:33 -07:00
2020-10-18 09:27:10 -07:00
2020-08-18 17:06:15 +02:00
2021-06-30 19:38:46 +02:00
2021-06-16 13:14:03 +02:00
2020-11-06 10:05:18 -08:00
2021-09-12 09:17:13 +02:00
2021-08-04 12:46:44 +02:00
2020-09-26 22:55:05 -04:00
2021-07-25 15:37:14 +02:00
2021-05-14 09:50:31 +02:00
2020-09-10 14:03:31 -07:00
2021-03-11 16:02:50 +00:00
2020-10-05 13:21:49 +02:00