Page MenuHomeFreeBSD

linuxkpi: Add `split_page()`
ClosedPublic

Authored by dumbbell on Mon, Aug 10, 5:31 PM.
Referenced Files
Unknown Object (File)
Mon, Sep 7, 9:31 PM
Unknown Object (File)
Mon, Sep 7, 9:21 PM
Unknown Object (File)
Sat, Sep 5, 9:27 PM
Unknown Object (File)
Sat, Sep 5, 6:00 PM
Unknown Object (File)
Sat, Sep 5, 2:17 PM
Unknown Object (File)
Sat, Sep 5, 7:37 AM
Unknown Object (File)
Fri, Sep 4, 7:18 PM
Unknown Object (File)
Fri, Sep 4, 4:01 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 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.