The patch titled Subject: mm: compaction: remove redundant VM_BUG_ON() in compact_zone() has been added to the -mm mm-unstable branch. Its filename is mm-compaction-remove-redundant-vm_bug_on-in-compact_zone.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-compaction-remove-redundant-vm_bug_on-in-compact_zone.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx> Subject: mm: compaction: remove redundant VM_BUG_ON() in compact_zone() Date: Tue, 10 Jan 2023 21:36:18 +0800 Patch series "Some small improvements for compaction". When I did some compaction testing, I found some small room for improvement as well as some code cleanups. This patch (of 5): The compaction_suitable() will never return values other than COMPACT_SUCCESS, COMPACT_SKIPPED and COMPACT_CONTINUE, so after validation of COMPACT_SUCCESS and COMPACT_SKIPPED, we will never hit other unexpected case. Thus remove the redundant VM_BUG_ON() validation for the return values of compaction_suitable(). Link: https://lkml.kernel.org/r/cover.1673342761.git.baolin.wang@xxxxxxxxxxxxxxxxx Link: https://lkml.kernel.org/r/740a2396d9b98154dba76e326cba5e798b640ead.1673342761.git.baolin.wang@xxxxxxxxxxxxxxxxx Signed-off-by: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx> Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/compaction.c | 3 --- 1 file changed, 3 deletions(-) --- a/mm/compaction.c~mm-compaction-remove-redundant-vm_bug_on-in-compact_zone +++ a/mm/compaction.c @@ -2313,9 +2313,6 @@ compact_zone(struct compact_control *cc, if (ret == COMPACT_SUCCESS || ret == COMPACT_SKIPPED) return ret; - /* huh, compaction_suitable is returning something unexpected */ - VM_BUG_ON(ret != COMPACT_CONTINUE); - /* * Clear pageblock skip if there were failures recently and compaction * is about to be retried after being deferred. _ Patches currently in -mm which might be from baolin.wang@xxxxxxxxxxxxxxxxx are mm-compaction-remove-redundant-vm_bug_on-in-compact_zone.patch mm-compaction-move-list-validation-into-compact_zone.patch mm-compaction-count-the-migration-scanned-pages-events-for-proactive-compaction.patch mm-compaction-add-missing-kcompactd-wakeup-trace-event.patch mm-compaction-avoid-fragmentation-score-calculation-for-empty-zones.patch