Re: [PATCH v1] mm/gup: remove (VM_)BUG_ONs

From: John Hubbard
Date: Fri Jun 06 2025 - 14:32:04 EST


...
David, what do you think?

Well, in this patch here I deliberately want _ONCE for the unpin sanity
checks. Because if they start happening (IOW, now after 5 years observed
for the first time?) I *absolutely don't* want to get flooded and
*really* figure out what is going on by seeing what else failed.

And crashing on VM_BUG_ON() and not observing anything else was also not
particularly helpful :)

Because ... they shouldn't be happening ...

(well, it goes back to my initial point about requiring individual
decisions etc ...)

Not sure what's best now in the general case, in the end I don't care
that much.

Roll a dice? ;)

One last data point: I've often logged onto systems that were running
long enough that the dmesg had long since rolled over. And this makes
the WARN_ON_ONCE() items disappear.

I think what would be *really* helpful would be quick access to the very first warning that triggered. At least that's what I usually dig for ... :)


These two use cases cannot be simultaneously solved, at least not
perfectly. Fortunately, since a VM_BUG_ON() case cannot ever happen,
either choice will work. hahaha :)

thanks,
--
John Hubbard