[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5041aaee-40e7-475d-81f1-020008dca3b1@lucifer.local>
Date: Wed, 4 Jun 2025 17:05:54 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: David Hildenbrand <david@...hat.com>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>,
Vlastimil Babka <vbabka@...e.cz>, Mike Rapoport <rppt@...nel.org>,
Suren Baghdasaryan <surenb@...gle.com>, Michal Hocko <mhocko@...e.com>,
Jason Gunthorpe <jgg@...pe.ca>, John Hubbard <jhubbard@...dia.com>,
Peter Xu <peterx@...hat.com>
Subject: Re: [PATCH v1] mm/gup: remove (VM_)BUG_ONs
On Wed, Jun 04, 2025 at 08:42:30AM -0700, Linus Torvalds wrote:
[snip]
> I really think that the *ONLY* situation where BUG() is valid is when
> you absolutely *know* that corruption will happen, and you cannot
> continue.
>
> Very much *not* some kind of "this is problematic, and who knows what
> corruption it might cause". But "I *know* I can't continue without
> major system because the hardware is broken sh*t".
>
> In other words, don't use it. Ever. Unless you can explain exactly why
> without any handwaving.
Thanks, this aligns with my understanding.
This does make VM_BUG_ON_xxx() look even more silly :) so I think we definitely
need to get rid of that...
'Absolutely definitely corruption but we only when CONFIG_DEBUG_VM is set' is
you know, insane.
>
> Cloud providers or others can do "panic-on-warn" if they want to stop
> the machine at the first sign of trouble.
>
> Linus
Yeah, I have seen people object to WARN_ON()'s because of this though 'hey
some people might panic here!!'. My view on that is - right, they can,
that's fine, they asked for it :)
Cheers, Lorenzo
Powered by blists - more mailing lists