printk_timed_ratelimit(9)
π NAME π
okay bestie, welcome to the Kernel API Manual page for printk_timed_ratelimit(9) β it's literally all about caller-controlled printk ratelimiting. No cap. π
π¦ SYNOPSIS π¦
bool printk_timed_ratelimit (unsigned long *caller_jiffies , unsigned
int interval_msecs );
π ARGUMENTS π
caller_jiffiesβ pointer to caller's state. That's your state, the caller's state, passed in by pointer. Keep it cute. β¨interval_msecsβ minimum interval between prints. Themsecsis right there in the name, bestie β milliseconds. π«Ά
π DESCRIPTION π
printk_timed_ratelimit is the little bool bestie that returns true when more than interval_msecs milliseconds have elapsed since the last time printk_timed_ratelimit returned true.
That's it. That's the whole function. It's giving rate-limit gatekeeper energy, but the caller is holding the state β hence caller-controlled. Periodt. π π₯
π SEE ALSO π
The whole printk/console group chat is here, plus the kernel file itself:
- Kernel file
./kernel/printk/printk.c console_list_lock(9)console_list_unlock(9)console_srcu_read_lock(9)console_srcu_read_unlock(9)console_lock_spinning_enable(9)console_lock_spinning_disable_and_check(9)console_trylock_spinning(9)printk_parse_prefix(9)add_preferred_console(9)match_devname_and_update_preferred_console(9)console_suspend_all(9)console_cpu_notify(9)console_lock(9)console_trylock(9)console_unlock(9)console_flush_on_panic(9)printk_kthreads_shutdown(9)console_force_preferred_locked(9)pr_flush(9)wake_up_klogd(9)defer_console_output(9)printk_trigger_flush(9)kmsg_dump_register(9)kmsg_dump_unregister(9)kmsg_dump_desc(9)kmsg_dump_get_line(9)kmsg_dump_get_buffer(9)kmsg_dump_rewind(9)console_try_replay_all(9)__printk_cpu_sync_wait(9)__printk_cpu_sync_try_get(9)__printk_cpu_sync_put(9)
Signed off from the ./kernel/printk source, dated October 2026 β stay rate-limited, bestie πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms