pt_entry_make_write_clean(9)
π pt_entry_make_write_clean(9) β the kernel API manual, bestie edition π
okay so real talk, this is a page from the Kernel API Manual and it's about one tiny little function that clears the "write dirty" bit on a page-table entry. sit down, hydrate, let's get into it π§
β¨ NAME β¨
pt_entry_make_write_clean β make the entry write clean π«§
like, literally the whole job. the name ate and left no crumbs.
πΈ SYNOPSIS πΈ
void pt_entry_make_write_clean (struct pt_state *pts );
that's it. that's the whole signature. no return value (it's void, so it gives you nothing back, king behavior π).
π¦ ARGUMENTS π¦
ptsβ the table entry you want to change π yes bestie, this is the one you're modifying. the entry. the table one.
π₯ DESCRIPTION π₯
so here's the vibe: you call this and it modifies the entry so that pt_entry_is_write_dirty == false. periodt. that's the assignment.
now the important lore π β the hardware isn't notified of this change immediately. it eventually finds out via a TLB flush, and that TLB flush is the point where the HW has to become synchronized. like, that's the moment. main character energy for the flush fr fr.
β οΈ so any "write dirty" that happens before the TLB flush can be lost β that's not a bug, that's just how it is. but once the TLB flush completes, all writes must make their entries write dirty. no cap. π
and there's a whole subtle thing about the format: it should alter the entry in a way that's compatible with any concurrent update from the HW. like it's sharing the entry with hardware and they need to not step on each other β¨ also β the entire contiguous entry is changed. the whole thing. not just a little piece. the entire contiguous entry π«Ά
π SEE ALSO π
all the sibling functions, obviously. the whole friend group π
- Kernel file
./drivers/iommu/generic_pt/pt_common.h pt_attr_from_entry(9),pt_can_have_leaf(9),pt_can_have_table(9),pt_clear_entries(9),pt_entry_make_write_dirty(9),pt_entry_is_write_dirty(9),pt_dirty_supported(9),pt_entry_num_contig_lg2(9),pt_entry_oa(9),pt_entry_oa_lg2sz(9),pt_entry_oa_exact(9),pt_full_va_prefix(9),pt_has_system_page_size(9),pt_install_leaf_entry(9),pt_install_table(9),pt_item_oa(9),pt_load_entry_raw(9),pt_max_oa_lg2(9),pt_num_items_lg2(9),pt_pgsz_lg2_to_level(9),pt_possible_sizes(9),pt_table_item_lg2sz(9),pt_table_oa_lg2sz(9),pt_table_pa(9),pt_table_ptr(9),pt_max_sw_bit(9),pt_test_sw_bit_acquire(9),pt_set_sw_bit_release(9),pt_load_entry(9)
and that's the page!! π this lil baddie lives over in ./drivers/iommu/generic_pt and the version/date on it is October 2026 β so yeah, she's from the future, we respect her π
β¨ go make some entries write clean, bestie, i believe in you π«Άπ
π¦ 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