Motr  M0
cache.c File Reference
#include "stob/cache.h"
#include "lib/memory.h"
#include "lib/thread.h"
#include "lib/arith.h"
#include "ut/ut.h"
#include "ut/threads.h"
#include "stob/stob.h"
#include "stob/stob_internal.h"
Include dependency graph for cache.c:

Go to the source code of this file.

Data Structures

struct  stob_ut_cache_ctx
 

Enumerations

enum  { STOB_UT_CACHE_THREAD_NR = 0x20, STOB_UT_CACHE_ITER_NR = 0x2000, STOB_UT_CACHE_STOB_NR = 0x40, STOB_UT_CACHE_COLD_SIZE = 0x10 }
 

Functions

static void stob_ut_cache_thread (struct stob_ut_cache_ctx *ctx)
 
static void stob_ut_cache_evict_cb (struct m0_stob_cache *cache, struct m0_stob *stob)
 
 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)
 
void m0_stob_ut_cache_idle_size0 (void)
 

Variables

static struct m0_stob stob_ut_cache_stobs [STOB_UT_CACHE_STOB_NR]
 
static struct m0_stob_cache stob_ut_cache
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
STOB_UT_CACHE_THREAD_NR 
STOB_UT_CACHE_ITER_NR 
STOB_UT_CACHE_STOB_NR 
STOB_UT_CACHE_COLD_SIZE 

Definition at line 35 of file cache.c.

Function Documentation

◆ m0_stob_ut_cache()

void m0_stob_ut_cache ( void  )

Definition at line 145 of file cache.c.

Here is the call graph for this function:

◆ m0_stob_ut_cache_idle_size0()

void m0_stob_ut_cache_idle_size0 ( void  )

Definition at line 151 of file cache.c.

Here is the call graph for this function:

◆ M0_UT_THREADS_DEFINE()

M0_UT_THREADS_DEFINE ( stob_cache  ,
stob_ut_cache_thread   
)

◆ stob_ut_cache_evict_cb()

static void stob_ut_cache_evict_cb ( struct m0_stob_cache cache,
struct m0_stob stob 
)
static

Definition at line 89 of file cache.c.

Here is the caller graph for this function:

◆ stob_ut_cache_test()

static void stob_ut_cache_test ( size_t  thread_nr,
size_t  iter_nr,
size_t  idle_size 
)
static

Definition at line 97 of file cache.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stob_ut_cache_thread()

static void stob_ut_cache_thread ( struct stob_ut_cache_ctx ctx)
static

Definition at line 51 of file cache.c.

Here is the call graph for this function:

Variable Documentation

◆ stob_ut_cache

struct m0_stob_cache stob_ut_cache
static

Definition at line 49 of file cache.c.

◆ stob_ut_cache_stobs

struct m0_stob stob_ut_cache_stobs[STOB_UT_CACHE_STOB_NR]
static

Definition at line 48 of file cache.c.