Page MenuHomeFreeBSD

device_pager: Add cdev_pager_get_path to retrieve the "path" for an object
ClosedPublic

Authored by jhb on Mar 12 2025, 7:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 25, 9:20 PM
Unknown Object (File)
Sat, Oct 25, 2:12 AM
Unknown Object (File)
Thu, Oct 23, 11:59 PM
Unknown Object (File)
Tue, Oct 21, 12:50 AM
Unknown Object (File)
Tue, Sep 30, 11:02 AM
Unknown Object (File)
Sep 27 2025, 12:20 PM
Unknown Object (File)
Sep 25 2025, 6:40 AM
Unknown Object (File)
Sep 22 2025, 5:35 PM
Subscribers

Details

Summary

This wraps a new optional cdev_pg_path method in struct
cdev_pager_ops. If the method pointer is NULL, the function does
nothing. The old device pager reads the pathname of the cdev stored
in the object handle to match the existing code.

Retire the OBJ_CDEVH flag as it is no longer needed.

Diff Detail

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

Event Timeline

jhb requested review of this revision.Mar 12 2025, 7:58 PM

I was able to verify that a character device using the default device pager still shows up with a device name in vmstat -o and procstat -v output.

More interesting would be for someone to fix some of the other drivers in the tree using cdev_pager_allocate() to add methods. I've added two simple examples in this series, but drm-kmod would probably be a more useful one to fix, perhaps by fixing the linuxkpi wrappers?

kib added inline comments.
sys/vm/device_pager.c
106
This revision is now accepted and ready to land.Mar 12 2025, 10:17 PM