Page MenuHomeFreeBSD

LinuxKPI: mm.h: implement virt_to_head_page()
ClosedPublic

Authored by bz on Jan 28 2023, 4:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 29, 12:21 PM
Unknown Object (File)
Sep 29 2024, 10:38 PM
Unknown Object (File)
Sep 20 2024, 12:04 PM
Unknown Object (File)
Sep 20 2024, 6:23 AM
Unknown Object (File)
Sep 19 2024, 12:23 PM
Unknown Object (File)
Sep 19 2024, 5:13 AM
Unknown Object (File)
Sep 1 2024, 12:27 AM
Unknown Object (File)
Aug 31 2024, 1:08 AM
Subscribers

Details

Summary

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

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.Jan 28 2023, 4:03 PM

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.

sys/compat/linuxkpi/common/include/linux/mm.h
162

Or just return (virt_to_page(p));

This revision is now accepted and ready to land.Jan 30 2023, 2:29 PM
This revision now requires review to proceed.Jan 30 2023, 2:34 PM
This revision is now accepted and ready to land.Jan 30 2023, 2:36 PM
This revision was automatically updated to reflect the committed changes.