diff options
| author | Brendan Jackman <jackmanb@google.com> | 2026-05-26 11:28:36 +0000 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-06-04 14:45:03 -0700 |
| commit | 62f272d2fbffa7494e4d01c35a3a7b30d71b30a1 (patch) | |
| tree | 970fd58c991bcc1abf1f579a9f47b903abb1514b /mm | |
| parent | 6cbdd9726fb50d749b06ab45a8ef81dff02e69b8 (diff) | |
| download | ath-62f272d2fbffa7494e4d01c35a3a7b30d71b30a1.tar.gz | |
mm/page_alloc: remove VM_BUG_ON()s from pindex helpers
Vlastimil pointed out that the VM_BUG_ON()s have fallen out of favour, so
remove them.
Link: https://lore.kernel.org/20260526-page_alloc-unmapped-prep-v2-1-412f4d486115@google.com
Signed-off-by: Brendan Jackman <jackmanb@google.com>
Suggested-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Link: https://lore.kernel.org/all/4074a816-9e75-45a6-8141-25459bcc106b@kernel.org/
Reviewed-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
| -rw-r--r-- | mm/page_alloc.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 7e3c79e79e5b8..97cb958205923 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -653,13 +653,8 @@ static inline unsigned int order_to_pindex(int migratetype, int order) if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) { bool movable = migratetype == MIGRATE_MOVABLE; - if (order > PAGE_ALLOC_COSTLY_ORDER) { - VM_BUG_ON(!is_pmd_order(order)); - + if (order > PAGE_ALLOC_COSTLY_ORDER) return NR_LOWORDER_PCP_LISTS + movable; - } - } else { - VM_BUG_ON(order > PAGE_ALLOC_COSTLY_ORDER); } return (MIGRATE_PCPTYPES * order) + migratetype; @@ -672,8 +667,6 @@ static inline int pindex_to_order(unsigned int pindex) if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) { if (pindex >= NR_LOWORDER_PCP_LISTS) order = HPAGE_PMD_ORDER; - } else { - VM_BUG_ON(order > PAGE_ALLOC_COSTLY_ORDER); } return order; |
