On Wed 19-06-24 12:30:42, Linus Torvalds wrote: > 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, I would be careful about the WARN_ONCE used from stackdepot itself. It's been some time since I have looked into that code but a quick grep tells there is some usage. -- Michal Hocko SUSE Labs