diff options
Diffstat (limited to 'include/linux/migrate.h')
| -rw-r--r-- | include/linux/migrate.h | 27 | 
1 files changed, 9 insertions, 18 deletions
| diff --git a/include/linux/migrate.h b/include/linux/migrate.h index c8077e936691..eeb818c4fc78 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h @@ -19,24 +19,7 @@ struct migration_target_control;   */  #define MIGRATEPAGE_SUCCESS		0 -/* - * Keep sync with: - * - macro MIGRATE_REASON in include/trace/events/migrate.h - * - migrate_reason_names[MR_TYPES] in mm/debug.c - */ -enum migrate_reason { -	MR_COMPACTION, -	MR_MEMORY_FAILURE, -	MR_MEMORY_HOTPLUG, -	MR_SYSCALL,		/* also applies to cpusets */ -	MR_MEMPOLICY_MBIND, -	MR_NUMA_MISPLACED, -	MR_CONTIG_RANGE, -	MR_LONGTERM_PIN, -	MR_DEMOTION, -	MR_TYPES -}; - +/* Defined in mm/debug.c: */  extern const char *migrate_reason_names[MR_TYPES];  #ifdef CONFIG_MIGRATION @@ -57,6 +40,12 @@ extern int migrate_huge_page_move_mapping(struct address_space *mapping,  				  struct page *newpage, struct page *page);  extern int migrate_page_move_mapping(struct address_space *mapping,  		struct page *newpage, struct page *page, int extra_count); +void folio_migrate_flags(struct folio *newfolio, struct folio *folio); +void folio_migrate_copy(struct folio *newfolio, struct folio *folio); +int folio_migrate_mapping(struct address_space *mapping, +		struct folio *newfolio, struct folio *folio, int extra_count); + +extern bool numa_demotion_enabled;  #else  static inline void putback_movable_pages(struct list_head *l) {} @@ -82,6 +71,8 @@ static inline int migrate_huge_page_move_mapping(struct address_space *mapping,  {  	return -ENOSYS;  } + +#define numa_demotion_enabled	false  #endif /* CONFIG_MIGRATION */  #ifdef CONFIG_COMPACTION |