Page MenuHomeFreeBSD

linuxkpi: Add `split_page()`
ClosedPublic

Authored by dumbbell on Aug 10 2026, 5:31 PM.
Referenced Files
F171979155: D58762.id185651.diff
Tue, Sep 15, 2:39 AM
F171940805: D58762.id186158.diff
Mon, Sep 14, 7:09 PM
Unknown Object (File)
Sun, Sep 13, 10:07 PM
Unknown Object (File)
Thu, Sep 10, 10:37 PM
Unknown Object (File)
Thu, Sep 10, 6:30 PM
Unknown Object (File)
Thu, Sep 10, 5:10 AM
Unknown Object (File)
Wed, Sep 9, 4:55 PM
Unknown Object (File)
Wed, Sep 9, 4:58 AM
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 Not Applicable
Unit
Tests Not Applicable

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.Wed, Sep 2, 9:45 PM
This revision was automatically updated to reflect the committed changes.