Skip to content

Commit

Permalink
mm/debug: sync up latest migrate_reason to migrate_reason_names
Browse files Browse the repository at this point in the history
Sync up MR_DEMOTION to migrate_reason_names and add a synch prompt.

Link: https://lkml.kernel.org/r/[email protected]
Fixes: 26aa2d1 ("mm/migrate: demote pages during reclaim")
Signed-off-by: Weizhao Ouyang <[email protected]>
Reviewed-by: "Huang, Ying" <[email protected]>
Reviewed-by: John Hubbard <[email protected]>
Cc: Anshuman Khandual <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Pavel Tatashin <[email protected]>
Cc: Yang Shi <[email protected]>
Cc: Zi Yan <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Mina Almasry <[email protected]>
Cc: "Matthew Wilcox (Oracle)" <[email protected]>
Cc: Oscar Salvador <[email protected]>
Cc: Wei Xu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
ownia authored and torvalds committed Sep 24, 2021
1 parent a4ce739 commit 57ed7b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/linux/migrate.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ 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,
Expand All @@ -32,7 +37,6 @@ enum migrate_reason {
MR_TYPES
};

/* In mm/debug.c; also keep sync with include/trace/events/migrate.h */
extern const char *migrate_reason_names[MR_TYPES];

#ifdef CONFIG_MIGRATION
Expand Down
1 change: 1 addition & 0 deletions mm/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const char *migrate_reason_names[MR_TYPES] = {
"numa_misplaced",
"contig_range",
"longterm_pin",
"demotion",
};

const struct trace_print_flags pageflag_names[] = {
Expand Down

0 comments on commit 57ed7b4

Please sign in to comment.