57 uint64_t state =
ctx->suc_index;
103 const struct m0_fid *stob_fid;
121 for (
i = 0;
i < thread_nr; ++
i) {
124 .suc_idle_size = idle_size,
125 .suc_iter_nr = iter_nr,
#define M0_ALLOC_ARR(arr, nr)
M0_INTERNAL void m0_stob_cache_add(struct m0_stob_cache *cache, struct m0_stob *stob)
void m0_stob_ut_cache_idle_size0(void)
static void stob_ut_cache_evict_cb(struct m0_stob_cache *cache, struct m0_stob *stob)
M0_INTERNAL const struct m0_fid * m0_stob_fid_get(struct m0_stob *stob)
M0_INTERNAL int m0_stob_cache_init(struct m0_stob_cache *cache, uint64_t idle_size, m0_stob_cache_eviction_cb_t eviction_cb)
static struct m0_stob * stob
static struct m0_stob stob_ut_cache_stobs[STOB_UT_CACHE_STOB_NR]
M0_INTERNAL void m0_stob_cache_lock(struct m0_stob_cache *cache)
M0_INTERNAL void m0_stob_cache_fini(struct m0_stob_cache *cache)
M0_INTERNAL void m0_stob_cache_unlock(struct m0_stob_cache *cache)
static struct m0_stob_cache stob_ut_cache
static void stob_ut_cache_thread(struct stob_ut_cache_ctx *ctx)
M0_INTERNAL uint64_t m0_rnd64(uint64_t *seed)
M0_UT_THREADS_DEFINE(stob_cache, stob_ut_cache_thread)
static void stob_ut_cache_test(size_t thread_nr, size_t iter_nr, size_t idle_size)
void m0_stob_ut_cache(void)
#define M0_UT_THREADS_STOP(name)
#define M0_UT_THREADS_START(name, thread_nr, param_array)
M0_INTERNAL struct m0_stob * m0_stob_cache_lookup(struct m0_stob_cache *cache, const struct m0_fid *stob_fid)
M0_INTERNAL void m0_stob_cache_idle(struct m0_stob_cache *cache, struct m0_stob *stob)