Page MenuHomeFreeBSD

linuxkpi: Add `split_page()`
ClosedPublic

Authored by dumbbell on Aug 10 2026, 5:31 PM.
Referenced Files
F174550747: D58762.id185651.diff
Sun, Oct 4, 2:43 AM
F174521530: D58762.id186158.diff
Sat, Oct 3, 9:43 PM
F174513038: D58762.diff
Sat, Oct 3, 8:20 PM
Unknown Object (File)
Sat, Oct 3, 10:38 AM
Unknown Object (File)
Fri, Oct 2, 10:41 PM
Unknown Object (File)
Fri, Oct 2, 10:37 PM
Unknown Object (File)
Fri, Oct 2, 6:15 PM
Unknown Object (File)
Thu, Oct 1, 3:43 PM
Subscribers

Details

Reviewers
bz
Group Reviewers
linuxkpi
Commits
rG153446ecd740: linuxkpi: Add `split_page()`
Summary

This function is supposed to split large pages into an array of PAGE_SIZE-sized pages, with correct refcounting. This is apparently used to allow some drivers to free a part of a large page only.

I don't think we use large pages in linuxkpi. Therefore, this new function is curently a no-op.

The DRM drivers TTM memory manager started to use it in Linux 6.15.

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

I don't think we use large pages in linuxkpi. Therefore, this new function is curently a no-op.

Is there a way we can add either a compile-time error or KASSERT to ensure this remains the case?

I don't think we use large pages in linuxkpi. Therefore, this new function is curently a no-op.

Is there a way we can add either a compile-time error or KASSERT to ensure this remains the case?

Or at least at the pr_debug("%s:TODO\n", func). I really should make that a macro and replace all occurrences.

Add a TODO.

I did’t find an API to get the size of a page, so I’m not sure how to implement an assertion.

You'll likely have to make ttm_pool_split_for_swap() return early then in FreeBSD?

This revision is now accepted and ready to land.Sep 2 2026, 9:45 PM
This revision was automatically updated to reflect the committed changes.