Implement virt_to_head_page(). We will have to improve this if we
start to allocate sub-page fragments.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential D38240
LinuxKPI: mm.h: implement virt_to_head_page() bz on Jan 28 2023, 4:03 PM. Authored by Tags None Referenced Files
Details Implement virt_to_head_page(). We will have to improve this if we Sponsored by: The FreeBSD Foundation
Diff Detail
Event TimelineComment Actions This seems ok, but I don't understand the reference to sub-page fragments. The purpose of this function is to return the "head" of a "compound" page. A compound page is an aligned, power-of-2-sized run of contiguous physical pages, and the head page is the first page of that run. So for instance the first 4KB page of a superpage. We don't maintain any notion of compound pages in the LinuxKPI, so your implementation is right IMO, but I can't see the connection to page_frag_cache etc.
|