|
static void | stob_perf_io_completed (struct stob_perf_io *pio) |
|
| M0_TL_DESCR_DEFINE (stob_perf_ios, "List of perfstob I/O", static, struct stob_perf_io, spi_link, spi_magic, M0_STOB_PERF_IO_MAGIC, M0_STOB_PERF_IO_HEAD_MAGIC) |
|
| M0_TL_DEFINE (stob_perf_ios, static, struct stob_perf_io) |
|
static void | stob_perf_type_register (struct m0_stob_type *type) |
|
static void | stob_perf_type_deregister (struct m0_stob_type *type) |
|
static struct stob_perf_domain * | stob_perf_domain_container (struct m0_stob_domain *dom) |
|
static struct stob_perf * | stob_perf_container (struct m0_stob *stob) |
|
static m0_time_t | stob_perf_latency_const (struct stob_perf_io *pio) |
|
static int | stob_perf_domain_cfg_init_parse (const char *str_cfg_init, void **cfg_init) |
|
static void | stob_perf_domain_cfg_init_free (void *cfg_init) |
|
static int | stob_perf_domain_cfg_create_parse (const char *str_cfg_create, void **cfg_create) |
|
static void | stob_perf_domain_cfg_create_free (void *cfg_create) |
|
static char * | stob_perf_domain_config (const char *location_data) |
|
static char * | stob_perf_domain_ldom_location (const char *location_data) |
|
static void | stob_perf_domain_cfg_parse (struct stob_perf_domain_cfg *cfg, const char *cfg_str) |
|
static int | stob_perf_domain_read_config (struct stob_perf_domain *pdom, const char *location_data) |
|
static int | stob_perf_domain_write_config (const char *cfg_str, uint64_t dom_key, const char *location_data) |
|
static int | stob_perf_domain_init (struct m0_stob_type *type, const char *location_data, void *cfg_init, struct m0_stob_domain **out) |
|
static void | stob_perf_domain_fini (struct m0_stob_domain *dom) |
|
static int | stob_perf_domain_dir_clean (const char *location_data) |
|
static int | stob_perf_domain_tmpfs_opts (char *opts, size_t opts_len, struct stob_perf_domain_cfg *cfg) |
|
static int | stob_perf_domain_create (struct m0_stob_type *type, const char *location_data, uint64_t dom_key, void *cfg_create) |
|
static int | stob_perf_domain_destroy (struct m0_stob_type *type, const char *location_data) |
|
static struct m0_stob * | stob_perf_alloc (struct m0_stob_domain *dom, const struct m0_fid *stob_fid) |
|
static void | stob_perf_free (struct m0_stob_domain *dom, struct m0_stob *stob) |
|
static int | stob_perf_cfg_parse (const char *str_cfg_create, void **cfg_create) |
|
static void | stob_perf_cfg_free (void *cfg_create) |
|
static void | stob_perf_linux_fid_set (struct m0_fid *lstob_fid, const struct m0_fid *stob_fid, struct stob_perf_domain *pdom) |
|
static int | stob_perf_linux_init_create (struct stob_perf_domain *pdom, const struct m0_fid *stob_fid, struct m0_dtx *dtx, bool create, struct m0_stob **out) |
|
static void | stob_perf_timer_start (struct stob_perf *pstob, struct stob_perf_io *pio) |
|
static void | stob_perf_ast_cb (struct m0_sm_group *grp, struct m0_sm_ast *ast) |
|
static unsigned long | stob_perf_timer_cb (unsigned long data) |
|
static int | stob_perf_init (struct m0_stob *stob, struct m0_stob_domain *dom, const struct m0_fid *stob_fid) |
|
static void | stob_perf_fini (struct m0_stob *stob) |
|
static void | stob_perf_create_credit (struct m0_stob_domain *dom, struct m0_be_tx_credit *accum) |
|
static int | stob_perf_create (struct m0_stob *stob, struct m0_stob_domain *dom, struct m0_dtx *dtx, const struct m0_fid *stob_fid, void *cfg) |
|
static void | stob_perf_destroy_credit (struct m0_stob *stob, struct m0_be_tx_credit *accum) |
|
static int | stob_perf_destroy (struct m0_stob *stob, struct m0_dtx *dtx) |
|
static int | stob_perf_punch_credit (struct m0_stob *stob, struct m0_indexvec *want, struct m0_indexvec *got, struct m0_be_tx_credit *accum) |
|
static int | stob_perf_punch (struct m0_stob *stob, struct m0_indexvec *range, struct m0_dtx *dtx) |
|
static void | stob_perf_write_credit (const struct m0_stob_domain *dom, const struct m0_stob_io *io, struct m0_be_tx_credit *accum) |
|
static uint32_t | stob_perf_block_shift (struct m0_stob *stob) |
|
static int | stob_perf_fd (struct m0_stob *stob) |
|
static void | stob_perf_consume_io (struct stob_perf_io *pio) |
|
static bool | stob_perf_io_lio_completed (struct m0_clink *clink) |
|
static int | stob_perf_io_init (struct m0_stob *stob, struct m0_stob_io *io) |
|
static int | stob_perf_io_launch (struct m0_stob_io *io) |
|
static void | stob_perf_io_fini (struct m0_stob_io *io) |
|
Performance STOB.
Performance STOB is a special implementation of m0_stob which is created for performance tests. Further, we will call it "perfstob".
Perfstob provides predefined I/O latency and bandwidth. It can be used to emulate behaviour of a particular disk roughly or for repeatable tests. Therefore, main purposes are:
- Test code in the absence of hardware;
- Provide environment for baseline tests;
Perfstob works in either of the two modes:
1. With storing data. In this mode, stored data can be read back. Maximum
size of such a stob depends on amount of spare RAM. This mode is
intended to be used for metadata;
2. Without storing data. In this mode, write operation goes through the
stob I/O stack, but is not stored anywhere and thus can't be read
back. User can write unlimited amount of data to such a stob.
In the both modes, perfstob domains and perfstobs survive process restart, but don't survive node restart.
Implementation of the perfstob.
Perfstob is implemented on top of linuxstob. Every perfstob domain mounts a tmpfs instance to the location and the linuxstob domain resides there.
A linuxstob is created for every perfstob. The linuxstob is represented by either a regular file or symlink to /dev/null depending on the perfstob mode.
Perfstob translates all I/O operations to linuxstob.
Configuration of the perfstob.
All perfstob features must be configured only with the perfstob domain configuration. This is done intentionally. Perfstob replaces other stobs and we want this to be done with minimum changes.
All configuration passed to m0_stob interface is ignored here. All necessary configuration is accessible via m0_stob_perf_domain::spd_cfg.
Latency emulation.
Perfstob emulates latency using a soft timer. Latency pattern is defined by a statefull callback function. Currently, there is only constant latency pattern.
Statistics.
Statistics is not implemented.
◆ STOB_PERF_DOM_CONFIG_PATH
#define STOB_PERF_DOM_CONFIG_PATH "/config" |
◆ STOB_PERF_DOM_LDOM_PATH
#define STOB_PERF_DOM_LDOM_PATH "/backstore" |
◆ stob_perf_latency_cb_t
◆ anonymous enum
Enumerator |
---|
STOB_TYPE_PERF | |
STOB_PERF_TMPFS_SIZE_DEFAULT | |
Definition at line 159 of file perf.c.
◆ M0_TL_DEFINE()
M0_TL_DEFINE |
( |
stob_perf_ios |
, |
|
|
static |
, |
|
|
struct stob_perf_io |
|
|
) |
| |
◆ M0_TL_DESCR_DEFINE()
◆ stob_perf_alloc()
◆ stob_perf_ast_cb()
◆ stob_perf_block_shift()
static uint32_t stob_perf_block_shift |
( |
struct m0_stob * |
stob | ) |
|
|
static |
◆ stob_perf_cfg_free()
static void stob_perf_cfg_free |
( |
void * |
cfg_create | ) |
|
|
static |
◆ stob_perf_cfg_parse()
static int stob_perf_cfg_parse |
( |
const char * |
str_cfg_create, |
|
|
void ** |
cfg_create |
|
) |
| |
|
static |
◆ stob_perf_consume_io()
static void stob_perf_consume_io |
( |
struct stob_perf_io * |
pio | ) |
|
|
static |
◆ stob_perf_container()
◆ stob_perf_create()
◆ stob_perf_create_credit()
◆ stob_perf_destroy()
static int stob_perf_destroy |
( |
struct m0_stob * |
stob, |
|
|
struct m0_dtx * |
dtx |
|
) |
| |
|
static |
◆ stob_perf_destroy_credit()
◆ stob_perf_domain_cfg_create_free()
static void stob_perf_domain_cfg_create_free |
( |
void * |
cfg_create | ) |
|
|
static |
◆ stob_perf_domain_cfg_create_parse()
static int stob_perf_domain_cfg_create_parse |
( |
const char * |
str_cfg_create, |
|
|
void ** |
cfg_create |
|
) |
| |
|
static |
◆ stob_perf_domain_cfg_init_free()
static void stob_perf_domain_cfg_init_free |
( |
void * |
cfg_init | ) |
|
|
static |
◆ stob_perf_domain_cfg_init_parse()
static int stob_perf_domain_cfg_init_parse |
( |
const char * |
str_cfg_init, |
|
|
void ** |
cfg_init |
|
) |
| |
|
static |
◆ stob_perf_domain_cfg_parse()
◆ stob_perf_domain_config()
static char* stob_perf_domain_config |
( |
const char * |
location_data | ) |
|
|
static |
◆ stob_perf_domain_container()
◆ stob_perf_domain_create()
static int stob_perf_domain_create |
( |
struct m0_stob_type * |
type, |
|
|
const char * |
location_data, |
|
|
uint64_t |
dom_key, |
|
|
void * |
cfg_create |
|
) |
| |
|
static |
◆ stob_perf_domain_destroy()
static int stob_perf_domain_destroy |
( |
struct m0_stob_type * |
type, |
|
|
const char * |
location_data |
|
) |
| |
|
static |
◆ stob_perf_domain_dir_clean()
static int stob_perf_domain_dir_clean |
( |
const char * |
location_data | ) |
|
|
static |
◆ stob_perf_domain_fini()
◆ stob_perf_domain_init()
static int stob_perf_domain_init |
( |
struct m0_stob_type * |
type, |
|
|
const char * |
location_data, |
|
|
void * |
cfg_init, |
|
|
struct m0_stob_domain ** |
out |
|
) |
| |
|
static |
◆ stob_perf_domain_ldom_location()
static char* stob_perf_domain_ldom_location |
( |
const char * |
location_data | ) |
|
|
static |
◆ stob_perf_domain_read_config()
static int stob_perf_domain_read_config |
( |
struct stob_perf_domain * |
pdom, |
|
|
const char * |
location_data |
|
) |
| |
|
static |
◆ stob_perf_domain_tmpfs_opts()
static int stob_perf_domain_tmpfs_opts |
( |
char * |
opts, |
|
|
size_t |
opts_len, |
|
|
struct stob_perf_domain_cfg * |
cfg |
|
) |
| |
|
static |
◆ stob_perf_domain_write_config()
static int stob_perf_domain_write_config |
( |
const char * |
cfg_str, |
|
|
uint64_t |
dom_key, |
|
|
const char * |
location_data |
|
) |
| |
|
static |
◆ stob_perf_fd()
static int stob_perf_fd |
( |
struct m0_stob * |
stob | ) |
|
|
static |
◆ stob_perf_fini()
static void stob_perf_fini |
( |
struct m0_stob * |
stob | ) |
|
|
static |
◆ stob_perf_free()
◆ stob_perf_init()
◆ stob_perf_io_completed()
static void stob_perf_io_completed |
( |
struct stob_perf_io * |
pio | ) |
|
|
static |
◆ stob_perf_io_fini()
static void stob_perf_io_fini |
( |
struct m0_stob_io * |
io | ) |
|
|
static |
◆ stob_perf_io_init()
◆ stob_perf_io_launch()
static int stob_perf_io_launch |
( |
struct m0_stob_io * |
io | ) |
|
|
static |
◆ stob_perf_io_lio_completed()
static bool stob_perf_io_lio_completed |
( |
struct m0_clink * |
clink | ) |
|
|
static |
◆ stob_perf_latency_const()
◆ stob_perf_linux_fid_set()
◆ stob_perf_linux_init_create()
◆ stob_perf_punch()
◆ stob_perf_punch_credit()
◆ stob_perf_timer_cb()
static unsigned long stob_perf_timer_cb |
( |
unsigned long |
data | ) |
|
|
static |
◆ stob_perf_timer_start()
◆ stob_perf_type_deregister()
static void stob_perf_type_deregister |
( |
struct m0_stob_type * |
type | ) |
|
|
static |
◆ stob_perf_type_register()
static void stob_perf_type_register |
( |
struct m0_stob_type * |
type | ) |
|
|
static |
◆ stob_perf_write_credit()
◆ m0_stob_perf_type [1/2]
◆ m0_stob_perf_type [2/2]
Initial value:= {
.st_fidt = {
.ft_name = "perfstob",
},
}
static struct m0_stob_type_ops stob_perf_type_ops
Definition at line 924 of file perf.c.
◆ stob_perf_domain_ops
Initial value:= {
}
static int stob_perf_cfg_parse(const char *str_cfg_create, void **cfg_create)
static void stob_perf_free(struct m0_stob_domain *dom, struct m0_stob *stob)
static int stob_perf_init(struct m0_stob *stob, struct m0_stob_domain *dom, const struct m0_fid *stob_fid)
static struct m0_stob * stob_perf_alloc(struct m0_stob_domain *dom, const struct m0_fid *stob_fid)
static void stob_perf_write_credit(const struct m0_stob_domain *dom, const struct m0_stob_io *io, struct m0_be_tx_credit *accum)
static void stob_perf_domain_fini(struct m0_stob_domain *dom)
static void stob_perf_cfg_free(void *cfg_create)
static int stob_perf_create(struct m0_stob *stob, struct m0_stob_domain *dom, struct m0_dtx *dtx, const struct m0_fid *stob_fid, void *cfg)
static void stob_perf_create_credit(struct m0_stob_domain *dom, struct m0_be_tx_credit *accum)
Definition at line 153 of file perf.c.
◆ stob_perf_io_ops
Initial value:= {
}
static int stob_perf_io_launch(struct m0_stob_io *io)
static void stob_perf_io_fini(struct m0_stob_io *io)
Definition at line 155 of file perf.c.
◆ stob_perf_ops
Initial value:= {
}
static int stob_perf_io_init(struct m0_stob *stob, struct m0_stob_io *io)
static void stob_perf_fini(struct m0_stob *stob)
static int stob_perf_destroy(struct m0_stob *stob, struct m0_dtx *dtx)
static int stob_perf_punch(struct m0_stob *stob, struct m0_indexvec *range, struct m0_dtx *dtx)
static int stob_perf_punch_credit(struct m0_stob *stob, struct m0_indexvec *want, struct m0_indexvec *got, struct m0_be_tx_credit *accum)
static uint32_t stob_perf_block_shift(struct m0_stob *stob)
static int stob_perf_fd(struct m0_stob *stob)
static void stob_perf_destroy_credit(struct m0_stob *stob, struct m0_be_tx_credit *accum)
Definition at line 154 of file perf.c.
◆ stob_perf_type_ops
Initial value:= {
}
static int stob_perf_domain_destroy(struct m0_stob_type *type, const char *location_data)
static void stob_perf_domain_cfg_create_free(void *cfg_create)
static void stob_perf_domain_cfg_init_free(void *cfg_init)
static int stob_perf_domain_cfg_create_parse(const char *str_cfg_create, void **cfg_create)
static void stob_perf_type_deregister(struct m0_stob_type *type)
static int stob_perf_domain_init(struct m0_stob_type *type, const char *location_data, void *cfg_init, struct m0_stob_domain **out)
static int stob_perf_domain_cfg_init_parse(const char *str_cfg_init, void **cfg_init)
static void stob_perf_type_register(struct m0_stob_type *type)
static int stob_perf_domain_create(struct m0_stob_type *type, const char *location_data, uint64_t dom_key, void *cfg_create)
Definition at line 884 of file perf.c.