]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common: refactor of lru
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 8 Sep 2017 04:01:31 +0000 (21:01 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 14 Sep 2017 03:22:07 +0000 (20:22 -0700)
commitc4d393e6d0b4497e94ab88a8f61436c6271e2ab8
tree00a14c5ce80d3363b8df91d7035d55c9368276f2
parent009d3ab0bc3cb5248701a4383e58a86337ee4982
common: refactor of lru

Avoids an unnecessary "max" size of the LRU which was used to calculate the
midpoint. Instead, just dynamically move the LRUObjects between top and bottom
on-the-fly.

This change is necessary for a cache which which does not limit by the number
of objects but by some other metric. (In this case, memory.)

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 12d615b3c546211b48ee75921f0e06371dd62dae)
src/client/Client.cc
src/client/Client.h
src/include/lru.h
src/mds/MDCache.cc
src/mds/MDCache.h
src/test/common/test_lru.cc