]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
lockdep: Reduce matrices usage range to minimum
authorPiotr Dałek <ceph@predictor.org.pl>
Fri, 22 Apr 2016 18:03:17 +0000 (20:03 +0200)
committerPiotr Dałek <git@predictor.org.pl>
Sun, 22 May 2016 14:04:33 +0000 (16:04 +0200)
commite010d936ed57bd8b54d5649272e79003ab70c236
tree4b954945c74c1699ab6cb5b69b0a8506dfa8253d
parentdc88e410629f6640ce7148f593498f7241a5bac1
lockdep: Reduce matrices usage range to minimum

Introduce current_maxid variable which holds highest lock ID. Using that,
don't attempt to check/reset parts of "follows" and "follows_bt" matrices
that are not used yet. This improves performance by reducing CPU usage
(particularly by lockdep_unregister() function), this also reduces RSS
memory usage by quite a bit, as many allocated pages are not actually
touched anymore. Improve CPU usage a bit more, by using memset() to
reset "follows" members instead of iterating byte-by-byte.
Finally, use push_front instead of push_back when unregistering, so
unregistered IDs will be recycled.

Signed-off-by: Piotr Dałek <git@predictor.org.pl>
src/common/lockdep.cc