]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: change ReplicatedPG::object_contexts to SharedLRU
authorDong Yuan <yuandong1222@gmail.com>
Wed, 12 Nov 2014 09:16:25 +0000 (09:16 +0000)
committerDong Yuan <yuandong1222@gmail.com>
Thu, 18 Dec 2014 10:52:24 +0000 (10:52 +0000)
commit98110f652a3ce94606c4ec07fe30d49e1589105c
treef87f40784ad8ca50cdfe5e649284d673438619f1
parentd61b1d926cf9d3a7c3f7e7ae79cf16c8d7979e5b
osd: change ReplicatedPG::object_contexts to SharedLRU

The ReplicatedPG now will cache the ObjectContext to avoid repeated
construction using SharedLRU. The cache is per PG, and new config
option osd_pg_object_context_cache_count which is 64 by default, is
used to specify how many ObjectContexts will be cached for each PG.

When the PG is not primary, the object_contexts cache will be cleared.

Signed-off-by: Dong Yuan <yuandong1222@gmail.com>
src/common/config_opts.h
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h