diff -uprN ceph-14.2.8/src/common/cohort_lru.h ceph-14.2.8/src/common/cohort_lru.h --- ceph-14.2.8/src/common/cohort_lru.h 2021-04-20 13:48:51.150000000 +0800 +++ ceph-14.2.8/src/common/cohort_lru.h 2021-04-20 14:07:43.670000000 +0800 @@ -42,6 +42,8 @@ namespace cohort { typedef bi::link_mode link_mode; + class ObjectFactory; // Forward declaration + class Object { private: @@ -70,7 +72,7 @@ namespace cohort { uint32_t get_refcnt() const { return lru_refcnt; } - virtual bool reclaim() = 0; + virtual bool reclaim(const ObjectFactory* newobj_fac) = 0; virtual ~Object() {} @@ -132,7 +134,7 @@ namespace cohort { (!(o->lru_flags & FLAG_EVICTING))); } - Object* evict_block() { + Object* evict_block(const ObjectFactory* newobj_fac) { uint32_t lane_ix = next_evict_lane(); for (int ix = 0; ix < n_lanes; ++ix, lane_ix = next_evict_lane()) { @@ -144,7 +146,7 @@ namespace cohort { ++(o->lru_refcnt); o->lru_flags |= FLAG_EVICTING; lane.lock.unlock(); - if (o->reclaim()) { + if (o->reclaim(newobj_fac)) { lane.lock.lock(); --(o->lru_refcnt); /* assertions that o state has not changed across @@ -236,7 +238,7 @@ namespace cohort { Object* insert(ObjectFactory* fac, Edge edge, uint32_t& flags) { /* use supplied functor to re-use an evicted object, or * allocate a new one of the descendant type */ - Object* o = evict_block(); + Object* o = evict_block(fac); if (o) { fac->recycle(o); /* recycle existing object */ flags |= FLAG_RECYCLE; @@ -425,6 +427,10 @@ namespace cohort { lat.lock->unlock(); return v; } /* find_latch */ + + bool is_same_partition(uint64_t lhs, uint64_t rhs) { + return ((lhs % n_part) == (rhs % n_part)); + } void insert_latched(T* v, Latch& lat, uint32_t flags) { (void) lat.p->tr.insert_unique_commit(*v, lat.commit_data); diff -uprN ceph-14.2.8/src/common/legacy_config_opts.h ceph-14.2.8/src/common/legacy_config_opts.h --- ceph-14.2.8/src/common/legacy_config_opts.h 2021-04-20 13:48:51.150000000 +0800 +++ ceph-14.2.8/src/common/legacy_config_opts.h 2021-04-20 14:08:22.110000000 +0800 @@ -1276,6 +1276,7 @@ OPTION(rgw_max_attr_name_len, OPT_SIZE) OPTION(rgw_max_attr_size, OPT_SIZE) OPTION(rgw_max_attrs_num_in_req, OPT_U64) +OPTION(rgw_obj_prefetch_size, OPT_INT) OPTION(rgw_max_chunk_size, OPT_INT) OPTION(rgw_put_obj_min_window_size, OPT_INT) OPTION(rgw_put_obj_max_window_size, OPT_INT) diff -uprN ceph-14.2.8/src/common/options.cc ceph-14.2.8/src/common/options.cc --- ceph-14.2.8/src/common/options.cc 2021-04-20 13:48:51.150000000 +0800 +++ ceph-14.2.8/src/common/options.cc 2021-04-20 14:10:35.880000000 +0800 @@ -5616,6 +5616,10 @@ std::vector