On Thu, 26 Mar 2026 15:20:20 +0530
Anshu Kumari
Currently, some log messages that would be useful at info or warn level are kept at debug level because there is no way to throttle them, and a guest could otherwise flood the host logs.
Add a logmsg_ratelimit() macro that uses per-call-site static variables to independently track each call site's rate. It allows up to LOG_RATELIMIT_BURST (5) messages per LOG_RATELIMIT_INTERVAL (1 second) window, then prints a suppression notice. When a new window opens and messages were suppressed, the count is reported after the next allowed message.
Link: https://bugs.passt.top/show_bug.cgi?id=134 Signed-off-by: Anshu Kumari
Applied, thanks, and welcome to the git log!
--- v4: - Print suppression notice immediately after the last allowed message, not on the next call, to avoid confusion with unrelated messages in between. - Add Link: tag before Signed-off-by
By the way, you can also decide to leave the whole history (v2, v3) here. I actually find it a bit more convenient, but not everybody does. I guess it depends on how fast you re-post: if there are chances somebody missed your v3, then having the whole history is nicer for reviewers. You could also consider using git-publish for this: https://github.com/stefanha/git-publish I don't use it because of my own scripts and habits, but some others on this list certainly do. -- Stefano