eminence / procfs

Rust library for reading the Linux procfs filesystem
Other
362 stars 106 forks source link

add /proc/kpagecount #232

Closed tatref closed 1 year ago

tatref commented 1 year ago

At the moment, get_count_in_range is performing a lot of reads. I'll benchmark and try to perform a single read for the whole Vec if it's worth it.

Also, I copy pasted some code from process::pagemap, but the unbounded ranges don't make any sense (same for page map). We should raise an error if this is the case.

eminence commented 1 year ago

I'll benchmark and try to perform a single read for the whole Vec if it's worth it.

Do you want to hold off on the merge until this is done? Or should we merge this now, and iterate if necessary in future pull requests?

tatref commented 1 year ago

Did some testing replacing the multiple reads in the loop by a single read, but program now runs slower... I guess this is not the main bottleneck.

I think this can be merged.

One future enhancement would be to replace u64 by a new type like Pfn(u64)