msc_buffer_get_page(9)
π msc_buffer_get_page β like, the whole manual, bestie π
okay so real talk, this page is msc_buffer_get_page(9) from the Kernel API Manual and it's honestly kind of a baddie β tiny function, big responsibilities. let's get into it π«Ά
πΈ NAME πΈ
msc_buffer_get_page β grab the MSC buffer page that lives at a given offset. that's it. that's the whole vibe β¨
π¦ SYNOPSIS π¦
struct page * msc_buffer_get_page (struct msc *msc , unsigned long pgoff
);
like yes she's a one-liner but she's that girl π
π ARGUMENTS π
mscβ the MSC device. your main character, the whole reason we're here πpgoffβ the page offset into the storage buffer. literally just "which page tho" π§
π₯ DESCRIPTION π₯
okay so here's the tea β β this function traverses msc::win_list, which means it is expecting the caller to already be holding msc::buf_mutex. not optional. not a suggestion. expected from the caller, fr fr.
π no cap: if you call this without holding msc::buf_mutex, that's a you problem β the docs say it's expected, so hold the mutex, bestie.
β RETURN β
you get back the page if pgoff corresponds to a valid buffer pageβ¦ or NULL if it doesn't. valid page = slay. NULL = no page for you, sorry π
π SEE ALSO π
the whole friend group, in kernel file ./drivers/hwtracing/intel_th/msu.c:
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_iterate(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)struct msc_win_to_user_struct(9)msc_win_to_user(9)intel_th_msc_window_unlock(9)
that's the whole page, bestie, you ate that πβ¨
π«Ά cute lil sign-off: this one lives under ./drivers/hwtracing/intel_th, dated October 2026 β iykyk π
π¦ 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