Skip to content

Commit ce32123

Browse files
bjackmanakpm00
authored andcommitted
mm: remove is_migrate_highatomic()
There are 3 potential reasons for is_migrate_*() helpers: 1. They represent higher-level attributes of migratetypes, like is_migrate_movable() 2. They are ifdef'd, like is_migrate_isolate(). 3. For consistency with an is_migrate_*_page() helper, also like is_migrate_isolate(). It looks like is_migrate_highatomic() was for case 3, but that was removed in commit e0932b6 ("mm: page_alloc: consolidate free page accounting"). So remove the indirection and go back to a simple comparison. Link: https://lkml.kernel.org/r/20250821-is-migrate-highatomic-v1-1-ddb6e5d7c566@google.com Signed-off-by: Brendan Jackman <jackmanb@google.com> Reviewed-by: Zi Yan <ziy@nvidia.com> Acked-by: David Hildenbrand <david@redhat.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Acked-by: SeongJae Park <sj@kernel.org> Cc: Liam Howlett <liam.howlett@oracle.com> Cc: Michal Hocko <mhocko@suse.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 9907e1d commit ce32123

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

mm/internal.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,11 +1333,6 @@ extern const struct trace_print_flags pageflag_names[];
13331333
extern const struct trace_print_flags vmaflag_names[];
13341334
extern const struct trace_print_flags gfpflag_names[];
13351335

1336-
static inline bool is_migrate_highatomic(enum migratetype migratetype)
1337-
{
1338-
return migratetype == MIGRATE_HIGHATOMIC;
1339-
}
1340-
13411336
void setup_zone_pageset(struct zone *zone);
13421337

13431338
struct migration_target_control {

mm/page_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ static inline void account_freepages(struct zone *zone, int nr_pages,
797797

798798
if (is_migrate_cma(migratetype))
799799
__mod_zone_page_state(zone, NR_FREE_CMA_PAGES, nr_pages);
800-
else if (is_migrate_highatomic(migratetype))
800+
else if (migratetype == MIGRATE_HIGHATOMIC)
801801
WRITE_ONCE(zone->nr_free_highatomic,
802802
zone->nr_free_highatomic + nr_pages);
803803
}

0 commit comments

Comments
 (0)