Messages in this thread | | | From | Linus Torvalds <> | Date | Fri, 15 Apr 2022 14:36:51 -0700 | Subject | Re: [PATCH v10 08/14] mm: multi-gen LRU: support page table walks |
| |
On Fri, Apr 15, 2022 at 2:32 PM Andrew Morton <akpm@linux-foundation.org> wrote: > > We could create a new MM-developer-only assertion. Might even call it > MM_BUG_ON(). With compile-time enablement but perhaps not a runtime > switch.
.. or VM_BUG_ON() could just become a WARN_ON_ONCE().
Which it should be anyway - since the code has to be written to continue after that BUG_ON() anyway.
There is absolutely _zero_ advantage to killing the machine. If you want to be notified about "this must not happen", then WARN_ON_ONCE() is the right thing to use.
BUG_ON() is basically always the wrong thing to do.
Linus
| |