summaryrefslogtreecommitdiff
path: root/rust/kernel/ratelimit.rs
AgeCommit message (Collapse)Author
10 daysrust: add pr_*_ratelimited! macros for printingAlice Ryhl
Printing can be very expensive if it occurs often, so printing that can be triggered by userspace should be rate limited. For this purpose, add a Rust wrapper around `struct ratelimit_state` and use it in the new macros. The new files will fall under the catch-all RUST maintainers entry. Tested-by: Alvin Sun <alvin.sun@linux.dev> Reviewed-by: Carlos Llamas <cmllamas@google.com> Link: https://github.com/Rust-for-Linux/linux/issues/122 Acked-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Alice Ryhl <aliceryhl@google.com> Link: https://patch.msgid.link/20261007-pr-ratelimited-v6-3-f14accd4ea3b@google.com [ Removed unused link reference definitions. On the `static`, allowed the `non_upper_case_globals` lint so that `kernel` users (and users providing their own name) do not warn. Reworded title for typo. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>