Li Xinhai
20ca87f22b
mm/mempolicy: check hugepage migration is supported by arch in vma_migratable()
...
vma_migratable() is called to check if pages in vma can be migrated before
go ahead to further actions. Currently it is used in below code path:
- task_numa_work
- mbind
- move_pages
For hugetlb mapping, whether vma is migratable or not is determined by:
- CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
- arch_hugetlb_migration_supported
Issue: current code only checks for CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
alone, and no code should use it directly. (note that current code in
vma_migratable don't cause failure or bug because
unmap_and_move_huge_page() will catch unsupported hugepage and handle it
properly)
This patch checks the two factors by hugepage_migration_supported for
impoving code logic and robustness. It will enable early bail out of
hugepage migration procedure, but because currently all architecture
supporting hugepage migration is able to support all page size, we would
not see performance gain with this patch applied.
vma_migratable() is moved to mm/mempolicy.c, because of the circular
reference of mempolicy.h and hugetlb.h cause defining it as inline not
feasible.
Signed-off-by: Li Xinhai <lixinhai.lxh@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Link: http://lkml.kernel.org/r/1579786179-30633-1-git-send-email-lixinhai.lxh@gmail.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-04-02 09:35:31 -07:00
..
2020-01-02 15:34:27 +01:00
2020-03-23 13:07:08 +01:00
2019-11-27 08:15:00 -08:00
2020-03-04 18:11:44 +01:00
2020-01-21 11:06:12 +05:30
2020-03-24 16:19:01 -07:00
2020-03-24 14:35:38 +01:00
2020-02-16 18:30:41 -08:00
2020-01-29 09:51:36 -08:00
2020-03-08 17:28:51 +00:00
2020-03-24 12:43:47 +00:00
2019-12-11 09:12:38 +01:00
2019-11-12 11:43:29 -05:00
2020-01-08 12:59:53 +01:00
2020-02-04 07:17:41 +00:00
2020-01-31 14:40:36 -08:00
2020-03-29 23:42:11 -07:00
2020-03-26 14:45:31 +01:00
2020-01-27 17:49:15 +01:00
2020-03-15 15:20:16 +01:00
2020-03-15 15:20:16 +01:00
2020-03-15 15:20:16 +01:00
2020-03-15 15:20:16 +01:00
2020-03-15 15:20:16 +01:00
2020-03-17 22:50:30 +00:00
2020-03-19 13:59:46 +01:00
2019-12-30 14:27:53 +01:00
2020-03-31 16:13:09 -07:00
2019-12-19 01:07:53 +01:00
2020-03-30 11:45:18 -07:00
2020-03-24 07:57:08 -06:00
2020-03-18 21:57:20 +00:00
2020-03-08 22:07:09 -07:00
2020-01-20 10:29:56 -08:00
2020-04-02 09:35:29 -07:00
2020-03-24 17:32:33 +00:00
2020-01-16 17:32:43 +05:30
2020-03-31 16:18:55 -07:00
2020-02-07 17:39:56 -08:00
2020-03-31 17:29:33 -07:00
2019-12-27 11:02:07 +01:00
2019-12-04 13:32:45 +10:00
2019-12-25 20:47:19 -07:00
2020-01-24 21:03:53 +01:00
2020-01-14 15:16:50 +01:00
2020-03-31 10:05:01 -07:00
2020-02-24 16:12:28 +01:00
2020-01-15 22:55:36 -05:00
2019-11-23 09:56:02 -08:00
2020-01-31 10:30:36 -08:00
2020-03-27 12:04:34 -06:00
2020-03-12 15:48:37 -07:00
2020-02-04 03:05:26 +00:00
2020-02-04 03:05:26 +00:00
2020-03-21 15:23:53 +01:00
2019-11-21 09:06:47 -07:00
2019-12-12 09:26:55 -07:00
2020-03-27 10:23:43 -06:00
2020-03-30 11:43:51 -07:00
2020-02-25 08:40:07 -07:00
2020-02-20 17:52:34 -05:00
2020-03-30 01:34:00 +02:00
2020-03-30 01:34:00 +02:00
2020-03-30 14:59:53 -07:00
2020-03-30 17:36:33 -07:00
2020-03-30 19:52:37 -07:00
2020-03-27 16:07:24 -07:00
2019-11-14 13:15:11 -05:00
2020-01-22 23:04:52 +01:00
2020-03-28 13:21:08 +01:00
2019-12-04 19:44:12 -08:00
2020-01-04 20:23:39 -07:00
2020-04-02 09:35:28 -07:00
2020-02-12 17:02:53 -05:00
2020-03-25 17:38:23 -07:00
2020-01-07 11:31:47 +01:00
2020-01-27 10:24:32 +01:00
2020-03-21 15:23:56 +01:00
2020-03-31 11:04:05 -07:00
2020-03-21 16:00:24 +01:00
2020-03-17 15:26:43 +01:00
2020-03-21 15:23:53 +01:00
2020-01-27 19:59:55 +01:00
2020-01-27 10:24:32 +01:00
2020-03-28 11:42:55 +01:00
2020-03-06 16:02:50 +00:00
2020-03-16 15:48:54 +00:00
2020-01-23 00:35:50 +01:00
2020-03-20 13:06:18 +01:00
2020-01-09 11:30:53 +08:00
2020-01-16 09:52:27 -08:00
2019-11-15 13:49:04 -05:00
2020-02-28 12:08:37 -08:00
2020-03-18 13:35:29 +01:00
2019-12-16 10:11:10 +01:00
2020-03-25 08:35:03 +09:00
2019-11-25 11:53:26 -08:00
2020-03-12 22:34:48 -07:00
2020-03-09 11:12:19 +01:00
2019-11-26 11:52:57 +01:00
2019-11-21 18:14:35 +01:00
2019-12-11 11:13:33 +05:30
2019-11-28 11:16:43 -08:00
2019-11-20 20:31:38 +01:00
2020-01-27 10:55:50 -08:00
2020-03-10 10:30:52 +01:00
2019-12-03 11:20:37 +01:00
2020-02-27 12:15:24 +01:00
2020-02-17 13:37:00 +01:00
2020-03-20 14:57:54 +01:00
2020-03-31 11:04:05 -07:00
2020-03-21 15:24:00 +01:00
2020-01-27 11:09:31 +01:00
2019-12-27 16:40:02 -08:00
2020-03-17 20:56:58 -07:00
2020-02-03 17:27:38 -07:00
2020-01-29 15:45:47 -07:00
2019-12-16 10:35:33 +01:00
2019-11-12 08:18:04 -08:00
2020-01-13 14:15:27 +09:00
2020-01-17 16:48:07 -08:00
2020-01-03 09:42:52 +01:00
2020-01-03 14:27:40 +01:00
2020-01-18 09:19:18 -05:00
2020-03-20 08:47:27 -06:00
2020-03-13 12:49:51 -07:00
2020-03-20 14:54:04 +01:00
2020-02-07 14:48:39 -05:00
2020-02-07 14:48:38 -05:00
2020-03-30 13:59:52 -07:00
2020-03-19 21:56:54 -07:00
2020-01-14 13:27:32 -08:00
2019-12-11 12:22:38 -08:00
2020-03-06 11:06:15 +01:00
2020-03-04 17:58:48 +01:00
2019-12-04 19:44:13 -08:00
2020-03-30 11:20:13 -07:00
2020-04-02 09:35:27 -07:00
2020-03-21 16:03:53 +01:00
2020-02-12 14:18:33 +01:00
2019-11-23 19:56:45 -04:00
2020-01-15 16:21:28 +10:00
2020-01-14 12:20:55 +01:00
2020-04-02 09:35:29 -07:00
2019-12-16 12:41:40 -08:00
2020-01-23 13:15:09 -08:00
2020-01-26 22:10:17 -05:00
2020-03-23 11:17:22 +01:00
2020-02-25 11:01:39 -08:00
2020-01-30 07:39:10 -08:00
2020-03-29 21:25:29 -07:00
2020-01-08 12:52:33 -08:00
2020-01-22 15:22:51 -05:00
2020-03-12 22:34:48 -07:00
2019-12-12 18:58:24 +01:00
2020-03-13 14:25:46 +01:00
2020-02-10 10:41:20 +01:00
2019-12-16 09:25:24 +02:00
2020-03-08 11:06:42 +01:00
2020-03-11 14:15:20 -06:00
2020-01-10 15:52:25 +00:00
2020-01-06 09:45:59 +01:00
2020-03-12 07:07:38 -06:00
2020-01-24 15:39:39 +01:00
2020-03-23 22:00:02 -07:00
2020-03-29 22:30:57 -07:00
2020-03-21 16:00:24 +01:00
2020-03-08 11:06:40 +01:00
2020-02-21 11:29:15 +01:00
2020-03-30 19:14:28 -07:00
2020-01-25 03:01:56 -05:00
2020-03-21 15:23:58 +01:00
2020-04-02 09:35:30 -07:00
2019-12-04 19:44:14 -08:00
2020-01-31 17:33:54 +00:00
2019-11-21 07:33:24 +01:00
2020-02-20 21:17:24 +01:00
2019-12-11 09:12:38 +01:00
2019-11-12 08:18:04 -08:00
2020-04-02 09:35:25 -07:00
2020-03-30 18:51:47 -07:00
2020-02-28 10:33:57 +01:00
2020-01-30 18:45:55 +01:00
2019-12-21 20:09:54 +01:00
2020-01-06 00:20:18 +01:00
2020-03-26 10:28:20 -06:00
2019-11-26 13:35:25 -07:00
2019-11-19 09:52:12 -08:00
2019-11-14 11:36:53 +08:00
2020-03-31 17:29:33 -07:00
2020-02-16 19:39:44 -08:00
2020-01-10 14:00:57 -08:00
2020-01-28 08:46:13 -08:00
2020-03-23 18:40:25 +01:00
2019-12-09 17:53:58 -05:00
2020-03-30 01:34:00 +02:00
2020-03-31 17:29:33 -07:00
2020-03-21 15:23:56 +01:00
2020-03-09 20:13:16 -07:00
2020-03-17 22:51:16 -07:00
2020-01-31 10:30:38 -08:00
2020-04-02 09:35:28 -07:00
2020-02-04 03:05:23 +00:00
2020-01-31 10:30:39 -08:00
2020-04-02 09:35:31 -07:00
2019-12-25 19:51:33 -08:00
2020-03-15 17:10:14 -07:00
2020-03-06 11:56:59 +01:00
2019-12-06 10:28:09 -08:00
2020-04-02 09:35:27 -07:00
2020-04-02 09:35:30 -07:00
2020-01-14 11:54:47 -04:00
2020-04-02 09:35:30 -07:00
2020-03-24 21:02:47 +01:00
2020-02-01 10:01:52 -08:00
2019-12-01 12:59:05 -08:00
2019-12-09 10:55:03 +01:00
2020-03-24 13:42:44 +01:00
2020-03-24 07:57:08 -06:00
2020-03-21 16:00:24 +01:00
2020-01-29 11:20:24 -08:00
2019-11-14 19:06:47 -08:00
2019-12-12 17:04:54 -08:00
2020-03-26 20:17:36 -07:00
2020-03-30 19:52:37 -07:00
2020-03-18 16:35:48 -07:00
2020-03-25 18:58:11 -07:00
2020-01-15 10:54:33 -05:00
2020-02-12 13:55:25 -05:00
2020-03-30 19:56:50 -04:00
2019-12-04 19:44:12 -08:00
2020-01-14 12:20:48 +01:00
2019-11-27 02:48:27 +09:00
2019-11-22 02:21:08 +09:00
2019-11-27 10:53:50 -08:00
2020-01-09 10:48:54 +01:00
2020-02-12 12:57:59 -08:00
2019-12-26 15:17:26 -08:00
2019-11-21 07:49:29 -06:00
2020-01-02 16:50:04 +01:00
2019-12-17 08:06:51 -08:00
2019-12-11 16:37:02 +08:00
2020-04-02 09:35:27 -07:00
2020-03-21 18:56:06 -07:00
2020-01-31 10:30:39 -08:00
2020-04-02 09:35:29 -07:00
2020-02-04 03:05:25 +00:00
2019-11-13 19:09:47 +08:00
2020-03-25 09:50:09 -06:00
2020-03-12 07:44:17 -06:00
2020-01-15 16:30:28 +00:00
2020-03-27 15:34:42 -07:00
2020-02-23 21:59:42 +01:00
2020-01-31 11:15:59 -08:00
2020-01-20 17:04:02 -07:00
2020-02-11 13:10:58 +01:00
2020-03-06 11:57:00 +01:00
2019-12-09 10:36:44 -08:00
2020-03-23 22:00:02 -07:00
2020-03-30 11:52:27 -07:00
2019-11-15 23:49:22 +01:00
2019-11-15 23:49:22 +01:00
2020-02-12 11:54:08 -08:00
2020-03-30 13:59:52 -07:00
2020-01-02 16:52:40 +01:00
2020-02-14 10:37:27 +01:00
2020-03-04 11:01:18 +01:00
2019-11-13 11:41:50 +01:00
2020-01-23 13:15:09 -08:00
2020-03-17 18:31:05 +01:00
2019-12-30 20:19:27 -08:00
2020-03-04 09:54:55 +01:00
2019-12-19 01:36:32 +01:00
2020-02-20 21:17:24 +01:00
2019-12-06 10:47:28 +01:00
2020-02-04 03:05:26 +00:00
2020-03-12 17:33:11 -07:00
2019-12-03 11:46:20 +01:00
2020-01-02 16:49:59 +01:00
2020-03-20 13:06:18 +01:00
2020-03-20 13:06:19 +01:00
2020-01-04 13:49:51 +08:00
2020-02-04 03:05:25 +00:00
2020-03-30 11:16:38 -07:00
2020-01-13 18:16:43 -08:00
2020-01-07 22:14:38 -08:00
2020-02-07 14:48:37 -05:00
2020-01-25 12:18:50 -05:00
2019-12-04 19:44:13 -08:00
2020-01-24 10:24:31 -08:00
2020-02-17 10:55:14 +01:00
2020-02-20 15:58:23 -08:00
2020-01-24 10:37:27 -08:00
2020-02-20 16:03:30 -08:00
2020-02-20 16:03:30 -08:00
2020-03-21 16:00:22 +01:00
2019-11-25 09:15:32 +01:00
2020-02-19 18:12:31 +00:00
2020-01-20 16:19:10 +01:00
2019-12-05 11:43:31 -08:00
2019-12-05 11:43:31 -08:00
2020-03-06 22:33:38 -08:00
2020-01-13 13:19:38 -05:00
2019-12-18 10:38:07 +01:00
2019-11-14 13:07:48 +08:00
2020-03-21 16:00:24 +01:00
2020-03-21 16:00:24 +01:00
2019-11-13 12:50:40 -07:00
2020-03-30 17:01:51 -07:00
2019-12-24 11:35:48 +00:00
2020-03-04 14:48:54 -08:00
2020-03-31 15:49:51 -07:00
2020-02-21 10:31:18 +01:00
2019-11-14 13:15:12 -05:00
2020-02-04 03:05:26 +00:00
2020-03-17 15:58:00 +01:00
2020-03-12 17:16:42 +01:00
2019-12-11 11:53:41 -08:00
2020-02-07 14:48:37 -05:00
2020-03-26 14:41:22 -04:00
2020-03-29 21:53:18 -07:00
2020-03-09 22:34:58 +01:00
2020-02-04 03:05:24 +00:00
2020-01-24 20:40:09 +01:00
2020-03-30 12:18:49 -07:00
2019-11-14 13:15:11 -05:00
2020-03-21 16:00:24 +01:00
2020-03-21 16:00:24 +01:00
2020-03-02 14:04:31 -07:00
2020-03-18 09:50:20 +00:00
2019-11-13 12:15:34 -08:00
2020-03-09 20:13:16 -07:00
2020-01-17 10:19:21 +01:00
2020-02-04 03:05:26 +00:00
2020-02-11 10:11:02 +01:00
2020-01-31 10:30:40 -08:00
2020-04-02 09:35:27 -07:00
2020-02-05 18:53:05 +01:00
2020-01-15 11:00:39 -06:00
2020-01-06 13:33:14 -08:00
2020-01-29 19:38:34 -08:00
2019-12-04 19:44:11 -08:00
2020-03-19 21:17:20 -07:00
2020-03-07 09:52:02 +01:00
2020-03-29 22:14:48 -07:00
2020-01-31 10:30:40 -08:00
2019-12-04 19:44:14 -08:00
2020-03-21 17:48:13 +01:00
2019-12-09 12:32:59 -08:00
2020-03-30 18:51:47 -07:00
2020-03-21 15:23:58 +01:00
2020-01-14 12:20:59 +01:00
2020-03-21 15:23:57 +01:00
2020-02-21 11:22:15 -08:00
2020-02-20 15:58:22 -08:00
2020-03-30 14:59:53 -07:00
2020-04-02 09:35:26 -07:00
2019-12-17 11:46:43 +02:00
2020-02-11 16:39:18 -08:00
2019-11-14 13:15:12 -05:00
2019-11-22 19:41:08 -05:00
2019-12-10 22:29:58 -05:00
2020-01-15 22:55:37 -05:00
2020-02-10 12:26:44 -08:00
2020-02-21 11:22:15 -08:00
2020-01-31 10:30:39 -08:00
2020-02-19 11:08:52 +01:00
2020-02-23 19:24:51 +01:00
2020-02-23 19:24:51 +01:00
2020-01-14 12:20:48 +01:00
2020-03-23 17:01:47 +01:00
2019-11-14 18:12:18 -08:00
2020-03-21 18:56:06 -07:00
2019-12-04 19:44:11 -08:00
2019-11-14 18:12:18 -08:00
2020-03-06 08:35:39 +01:00
2019-11-14 12:20:02 +08:00
2020-02-11 13:10:56 +01:00
2020-02-12 15:59:40 -05:00
2020-01-17 22:33:37 -05:00
2020-01-31 10:30:40 -08:00
2020-03-09 11:12:19 +01:00