]> git.apps.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>
Tue, 12 Sep 2017 22:46:24 +0000 (15:46 -0700)
commit12d615b3c546211b48ee75921f0e06371dd62dae
tree85313a376ef4354880693e57b66f2ae40ea49515
parent0c2032c2876c3e2cd0d23ab883fc72375731cadf
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>
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