kmsg_dump_rewind(9)
π« kmsg_dump_rewind β reset the iterator
okay so real talk bestie, this is a page from the Kernel API Manual (yes, the big scary one, don't panic πΈ) and honestly? It's a tiny little function with main character energy. Let's get into it.
β¨ SYNOPSIS β¨
void kmsg_dump_rewind (struct kmsg_dump_iter *iter );
literally one line. one line of pure power. no cap. π
π ARGUMENTS π
iterβ the kmsg dump iterator. that's it, that's the whole arg. it's the little guy getting rewound π
π DESCRIPTION π
So here's the vibe: this function resets the dumper's iterator. Like, hits the rewind button. back to the start. the way that a cassette tape goes click and suddenly you're at the beginning again π
and why do we care?? because once you've rewound it, you can call kmsg_dump_get_line and kmsg_dump_get_buffer again β and use them multiple times within the same dumper.dump callback. yes bestie, multiple times. you're not one-and-done. you get to go again. iconic behavior honestly π«Ά
β no cap: if you don't rewind, you don't get a second pass. this tiny function is the whole reason your dumper can loop. give it the respect it deserves π
π¦ SEE ALSO π¦
this list is long long, but we do not skip. we do not leave anyone out. every single one of these is invited to the group chat π
Kernel file ./kernel/printk/printk.c plus:
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)printk_timed_ratelimit(9)kmsg_dump_register(9)kmsg_dump_unregister(9)kmsg_dump_desc(9)kmsg_dump_get_line(9)kmsg_dump_get_buffer(9)console_try_replay_all(9)__printk_cpu_sync_wait(9)__printk_cpu_sync_try_get(9)__printk_cpu_sync_put(9)
fr fr that's the whole squad π
and that's the page!! mwah π this little beauty lives in ./kernel/printk, dated October 2026, and it goes by kmsg_dump_rewind(9) β stan her, rewind responsibly, and go read the rest of the kernel docs 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