Page MenuHomeFreeBSD

device_pager: user iterators to free device pages
ClosedPublic

Authored by dougm on Nov 20 2024, 11:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 21, 8:11 PM
Unknown Object (File)
Mon, Apr 21, 1:36 PM
Unknown Object (File)
Thu, Apr 17, 1:11 PM
Unknown Object (File)
Sun, Mar 30, 3:40 AM
Unknown Object (File)
Mar 4 2025, 6:52 AM
Unknown Object (File)
Feb 24 2025, 8:07 PM
Unknown Object (File)
Feb 22 2025, 2:19 PM
Unknown Object (File)
Feb 22 2025, 1:50 PM

Details

Summary

Change cdev_mgtdev_page_free_page to take an iterator, rather than an object and page, so that removing the page from the object radix tree can take advantage of locality with iterators. Define a general-purpose function to free multiple pages, which can be used in several places.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sys/vm/device_pager.c
267
291

Looking at the callers of cdev_mgtdev_pager_free_pages(), I believe that in all cases the page count is simply the number of resident pages in the object. In that case, I would suggest simply iterating over all pages in the object and freeing them, rather than passing this count.

dougm marked an inline comment as done.

Drop length argument to cdev_mgtdev_pager_free_pages().

This revision is now accepted and ready to land.Nov 21 2024, 10:34 AM