folio_zero_tail(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so this is the folio_zero_tail(9) page from the Kernel API Manual, and it is literally about one thing: zeroing the tail of a folio. πŸ¦‹

  • folio_zero_tail β€” zero the tail of a folio. periodt. πŸ’…

🌸 SYNOPSIS 🌸

void * folio_zero_tail (struct folio *folio , size_t offset , void
*kaddr );

πŸŽ€ ARGUMENTS πŸŽ€

  • folio β€” the folio you're zeroing, bestie. πŸ’–
  • offset β€” the byte offset in the folio where the zeroing starts. Like, the exact spot where the tail begins. ✨
  • kaddr β€” the address the folio is currently mapped to. 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe: if you have already used kmap_local_folio to map a folio, written some data to it, and now need to zero the end of the folio (and flush the dcache), you can use this function. No cap. πŸ”₯

πŸ’€ but listen β€” if you do not have the folio kmapped (eg the folio has been partially populated by DMA), use folio_zero_range or folio_zero_segment instead. do not come for folio_zero_tail in that situation, okay? πŸ™ˆ

⭐ RETURN ⭐

It returns an address which can be passed to kunmap_local. that's the whole return vibe. πŸ‘‘


🌈 SEE ALSO 🌈

Kernel file: ./include/linux/highmem.h β€” yes, that exact file, bestie. and the whole squad is: kmap(9), kunmap(9), kmap_to_page(9), kmap_flush_unused(9), kmap_local_page(9), kmap_local_folio(9), kmap_atomic(9), clear_user_page(9), clear_user_pages(9), clear_user_highpage(9), clear_user_highpages(9), vma_alloc_zeroed_movable_folio(9), memcpy_from_folio(9), memcpy_to_folio(9), folio_fill_tail(9), memcpy_from_file_folio(9), folio_zero_segments(9), folio_zero_segment(9), folio_zero_range(9), folio_release_kmap(9). πŸ’œ


and that's the page! signed off by the footer: source/version ./include/linux, date October 2026, title folio_zero_tail(9) β€” mwah πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from