[LU-5988] obd_memory stats cleanup Created: 05/Dec/14  Updated: 10/Jul/15  Resolved: 10/Jul/15

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.8.0

Type: Task Priority: Minor
Reporter: Andreas Dilger Assignee: Andreas Dilger
Resolution: Fixed Votes: 0
Labels: easy

Rank (Obsolete): 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.


 Comments   
Comment by Andreas Dilger [ 05/Jun/15 ]

Partial patch here http://review.whamcloud.com/15110

Comment by Gerrit Updater [ 10/Jul/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/15110/
Subject: LU-5988 obdclass: drop malloc fault and page accounting
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 33754bef1a26b40687f2bb8677fb3aadcc2d5c23

Comment by Peter Jones [ 10/Jul/15 ]

Landed for 2.8

Generated at Sat Feb 10 01:56:14 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.