]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common: compute SimpleLRU's size with contents.size() instead of lru.size() 19938/head
authorXuehan Xu <xuxuehan@360.cn>
Sat, 6 Jan 2018 02:40:33 +0000 (10:40 +0800)
committerSage Weil <sage@redhat.com>
Fri, 12 Jan 2018 19:33:43 +0000 (13:33 -0600)
commitd5e2e43de82cb1bf02b32bfea5a8e4c9bb495494
tree5307966f5032d14001bf6db969f8cfcae7cf9138
parent905b73442b8b16a898fcc8168a8ef4da792424bc
common: compute SimpleLRU's size with contents.size() instead of lru.size()

As libstdc++ earlier than version 5 implement the list::size() as a O(n) operation,
this should be needed to avoid regression of various ceph component's performance.

Signed-off-by: Xuehan Xu <xuxuehan@360.cn>
(cherry picked from commit 7e0a27a5c8b7d12d378de4d700ed7a95af7860c3)
src/common/simple_cache.hpp