STRUCT VMW_BO_DIRTY(9)
π struct vmw_bo_dirty π
okay so bestie, welcome to the Kernel API Manual, section 9, and today's main character is struct vmw_bo_dirty. yes it's a struct. yes it's about dirty info. no we're not being weird about it, it's literally dirty pages, like memory pages that got written to. put the eyebrow down. π¦
β¨ NAME β¨
struct vmw_bo_dirty β the Dirty information for buffer objects. that's it, that's the whole vibe. it's the receipts for which pages got touched. π
π SYNOPSIS π
struct vmw_bo_dirty {
struct kref ref_count;
unsigned long start;
unsigned long end;
enum vmw_bo_dirty_method method;
unsigned int change_count;
unsigned long bitmap_size;
unsigned long bitmap[];
};
look at her. flexible array member at the end, absolute queen behavior. π
π«Ά Members π«Ά
okay so let's go through the whole cast, no skipping, i would never:
ref_countβ the Reference count for this structure. and bestie listen to me very carefully: Must be first member! like, not "should", not "ideally", MUST. it's giving load-bearing first member energy, do not move her, do not pass go. πstartβ the First currently dirty bit. where the mess begins, honestly relatable. πΈendβ the Last currently dirty bit + 1. yes, plus one. it's a half-open range, it's exclusive, it's chic, it's math. π§methodβ the The currently used dirty method. that's anenum vmw_bo_dirty_method, and it's literally which strategy we're doing rn. slay. πchange_countβ the Number of consecutive method change triggers. so we're counting how many times in a row we flipped methods. keeping tabs. πbitmap_sizeβ the The size of the bitmap in bits. Typically equal to the nuber of pages in the bo. (yes "nuber" β that's a typo in the original, it lives here now, it's canon, we love her anyway π). anyway: bits, in the bitmap, usually = pages in the bo. π₯bitmapβ the A bitmap where each bit represents a page. A set bit means a dirty page. one bit per page, set = dirty. that's the entire mechanic, it's honestly iconic in its simplicity. β
ngl the whole struct is just "who got touched, and by which method" and honestly? same.
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/vmwgfx/vmwgfx_page_dirty.cβ go read the source bestie, it's right there vmw_bo_dirty_scan_pagetable(9)vmw_bo_dirty_scan_mkwrite(9)vmw_bo_dirty_scan(9)vmw_bo_dirty_pre_unmap(9)vmw_bo_dirty_unmap(9)vmw_bo_dirty_add(9)vmw_bo_dirty_release(9)vmw_bo_dirty_transfer_to_res(9)vmw_bo_dirty_clear_res(9)
every single one of them, linked, unsummarized, the full friend group. iykyk. π«Ά
and that's the page!! π shoutout to ./drivers/gpu/drm/vmwgfx for hosting this whole situation, dated October 2026 β yes, the future, she's ahead of her time, we stan a forward-dated manual page. mwah π π β¨
π¦ 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