Actions
Bug #11871
closedsmatch should not hammer linux procfs path
Start date:
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:
Description
While waiting for an illumos-joyent build, I was perusing lockstat(1)
output and observed what seemed to be unusually high contention in some VFS codepaths. Further investigation lead me to smatch, which was repeatedly attempting to open /proc/self/statm
as part of an API for process memory accounting. Not only is that a Linux /proc
path that is missing on illumos, the logic makes no attempt at caching the file descriptor. It would be nice to:
1. Use /proc/self/psinfo
for meaningful data
2. Cache the open fd, so we don't need to repeatedly hammer open/read/close
Updated by John Levon about 4 years ago
I tested Patrick's changes with several repeated builds.
Updated by Electric Monk about 4 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
git commit a0ee54468d6e6b136d1ca470a03bb44165c66e6e
commit a0ee54468d6e6b136d1ca470a03bb44165c66e6e Author: Patrick Mooney <pmooney@pfmooney.com> Date: 2019-10-29T14:41:10.000Z 11871 smatch should not hammer linux procfs path Reviewed by: John Levon <john.levon@joyent.com> Approved by: Dan McDonald <danmcd@joyent.com>
Actions