Pseudo Filesystem: procfs, sysfs, debugfs, configfs¶
Các filesystem ảo để kernel xuất thông tin và nhận cấu hình từ user space.
procfs¶
TODO
proc_create(),proc_opsseq_filecho dữ liệu lớn- Vì sao không nên thêm thông tin mới vào
/proc
sysfs¶
TODO
- kobject, kset, ktype
DEVICE_ATTR_RW, attribute group- Quy tắc mỗi file một giá trị
- Tài liệu ABI trong
Documentation/ABI/
debugfs¶
TODO
debugfs_create_*()- Không có cam kết ABI, chỉ dùng cho debug
configfs¶
TODO
- User tạo object từ phía mình
- Ví dụ USB gadget
tracefs¶
TODO
- Chỉ nhắc qua, xem FTrace
Ví dụ chạy thử¶
TODO
- Driver mẫu xuất attribute qua sysfs và debugfs
Khi nào dùng / không nên dùng¶
TODO
- Ưu điểm, hạn chế
- So sánh với các interface khác