]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: go beyond pinned onodes while trimming the cache. 39720/head
authorIgor Fedotov <ifedotov@suse.com>
Fri, 26 Feb 2021 14:16:11 +0000 (17:16 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Mon, 1 Mar 2021 22:35:59 +0000 (01:35 +0300)
commit05f7294558ef380e2d9fd2deb848be2570a07854
tree574cb758046395b5a9b92c7cb76f41dfb81469fa
parent95dd0f8f6670f9b6d1bce3da4813a92dd9399e0b
os/bluestore: go beyond pinned onodes while trimming the cache.

One might face lack of cache trimming when there is a bunch of pinned entries on the top of Onode's cache LRU list. If these pinned entries stay in the state for a long time cache might start using too much memory causing OSD to go out of osd-memory-target limit. Pinned state tend to happen to osdmap onodes.
The proposed patch preserves last trim position in the LRU list (if it pointed to a pinned entry) and proceeds trimming from that position if it wasn't invalidated. LRU nature of the list enables to do that safely since no new entries appear above the previously present entry while it's not touched.

Fixes: https://tracker.ceph.com/issues/48729
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
src/common/legacy_config_opts.h
src/common/options.cc
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h
src/test/objectstore/store_test.cc