msc_buffer_iterate(9)
πΈ NAME πΈ
okay so bestie, welcome to the msc_buffer_iterate(9) page from the Kernel API Manual β¨ This is the one about the function that goes through multiblock buffer's data, and it is iconic in a deeply kernel-core way π
msc_buffer_iterate β go through multiblock buffer's data.
π¦ SYNOPSIS π¦
ssize_t msc_buffer_iterate (struct msc_iter *iter , size_t size , void
*data , unsigned long (*fn)(void *, void *, size_t) );
π ARGUMENTS π
iterβ iterator structure. the iterator bestie in question.sizeβ amount of data to scan. literally how much data we're scanning, periodt.dataβ callback's private data. the callback's private stash.fnβ iterator callback. the callback main character.
π DESCRIPTION π
This will start at the window which will be written to next (containing the oldest data) and work its way to the current window, calling fn for each chunk of data as it goes. chunk by chunk, callback by callback β itβs giving oldest-to-current energy, fr fr.
π₯ caller caveat, bestie: Caller should have msc::user_count reference to make sure the buffer doesn't disappear from under us. like, do not skip this.
β RETURN β
amount of data actually scanned. That's the return value β the actual scanned amount, not the vibe estimate π
π SEE ALSO π
Kernel file ./drivers/hwtracing/intel_th/msu.c β plus this whole linked-up squad, iykyk:
struct msc_window(9)struct msc_iter(9)struct msc(9)struct msu_buffer_entry(9)msc_is_last_win(9)msc_next_window(9)msc_find_window(9)msc_oldest_window(9)msc_win_oldest_sg(9)msc_buffer_clear_hw_header(9)msc_configure(9)msc_disable(9)msc_buffer_contig_alloc(9)msc_buffer_contig_free(9)msc_buffer_contig_get_page(9)msc_buffer_win_alloc(9)msc_buffer_win_free(9)msc_buffer_relink(9)msc_buffer_free(9)msc_buffer_alloc(9)msc_buffer_unlocked_free_unless_used(9)msc_buffer_free_unless_used(9)msc_buffer_get_page(9)struct msc_win_to_user_struct(9)msc_win_to_user(9)intel_th_msc_window_unlock(9)
xoxo, bestie π«Ά source/version: ./drivers/hwtracing/intel_th Β· date: October 2026 π
π¦ 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