Re: [PATCH v1] mm/gup: remove (VM_)BUG_ONs
From: Lorenzo Stoakes
Date: Fri Jun 06 2025 - 14:47:35 EST
On Fri, Jun 06, 2025 at 03:42:12PM -0300, Jason Gunthorpe wrote:
> On Fri, Jun 06, 2025 at 08:23:25PM +0200, David Hildenbrand wrote:
> > > 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 ... :)
>
> That's basically my point, it doesn't make sense to expose two APIs to
> developers with a choice like this. The WARN_ON infrastructure should
> deal with it consistently, maybe even configurable by the admin.
>
> Keeping the first warn in a buffer is definately a good option.
>
> Otherwise how is the patch author supposed to decide which API to
> call in each case?
>
> Jason
To clarify - are we talking the first instance of a specific warning, or
the first warning in general?