On 4/13/26 22:34, Zi Yan wrote: > On 13 Apr 2026, at 16:20, Matthew Wilcox wrote: > >> On Mon, Apr 13, 2026 at 03:20:19PM -0400, Zi Yan wrote: >>> collapse_file() requires FSes supporting large folio with at least >>> PMD_ORDER, so replace the READ_ONLY_THP_FOR_FS check with that. >>> MADV_COLLAPSE ignores shmem huge config, so exclude the check for shmem. >>> >>> While at it, replace VM_BUG_ON with VM_WARN_ON_ONCE. >> >> Why? These are bugs. I don't think we gain anything from continuing. > > The goal is to catch these issues during development. VM_BUG_ON crashes > the system and that is too much for such issues in collapse_file().
VM_BUG_ON should have never been added to the kernel. -- Cheers, David

