Details
-
Task
-
Resolution: Fixed
-
Minor
-
None
-
16705
Description
The obd_memory statistics have atrophied over time and could use a cleanup.
- OBD_MEMORY_PAGES_STAT is no longer really used. It was previously used via OBD_ALLOC_PAGE-> __OBD_PAGE_ALLOC_VERBOSE-> obd_pages_add() but that macro is not used in llite or obdfilter/OSD anymore. This whole series of macros (including OBD_PAGE_FREE(), obd_pages_sub()) could be removed (with a fond memory that it was useful to know how many data pages Lustre had allocated, at the time it was working).
- OBD_MEMORY_STAT is only ever used to get the total amount of memory, so it doesn't make sense to keep this as a lprocfs_counter, it could just be a percpu_counter. That means obd_memory could also be removed.
- lprocfs_counter and lprocfs_percpu might potentially benefit from using the upstream kernel percpu_counter infrastructure instead of rolling our own alloc/free/counting.
Landed for 2.8