Re: [PATCH] mm: ratelimit oversized kvmalloc warnings instead of once
From: Linus Torvalds
Date: Wed Jun 19 2024 - 15:31:14 EST
On Wed, 19 Jun 2024 at 10:47, Shakeel Butt <shakeel.butt@xxxxxxxxx> wrote:
>
> Linus, please let me know if you have any concerns on the approach
> Michal is suggesting i.e. a variant for warn once for unique call stack.
I think we should just try to change the existing WARN_ONCE(), and see
if it causes any issues.
A new "WARN_UNIQUE()" might be the borign and safe approach, but
(a) it won't actually be unique if you don't have stackdepot anyway,
and will just be WARN_ONCE
(b) I suspect most WARN_ONCE users really do want WARN_UNIQUE
so let's at least _start_ with just changing semantics of the existing
"once", and then if it causes problems we'll have to revisit this.
I doubt it will cause problems,
Linus