Motr  M0
perf.c File Reference
#include "lib/trace.h"
#include "stob/perf.h"
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <stdio.h>
#include <unistd.h>
#include "lib/errno.h"
#include "lib/locality.h"
#include "lib/memory.h"
#include "lib/string.h"
#include "lib/timer.h"
#include "stob/type.h"
#include "stob/domain.h"
#include "stob/io.h"
#include "stob/stob.h"
Include dependency graph for perf.c:

Go to the source code of this file.

Data Structures

struct  stob_perf_domain_cfg
 
struct  stob_perf_domain
 
struct  stob_perf_stats
 
struct  stob_perf
 
struct  stob_perf_io
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_STOB
 
#define STOB_PERF_DOM_CONFIG_PATH   "/config"
 
#define STOB_PERF_DOM_LDOM_PATH   "/backstore"
 
#define __LINUXSTOB   "linuxstob:"
 

Typedefs

typedef m0_time_t(* stob_perf_latency_cb_t) (struct stob_perf_io *)
 

Enumerations

enum  { STOB_TYPE_PERF = 0xFE, STOB_PERF_TMPFS_SIZE_DEFAULT = 128 }
 

Functions

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_domainstob_perf_domain_container (struct m0_stob_domain *dom)
 
static struct stob_perfstob_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_stobstob_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)
 

Variables

static struct m0_stob_domain_ops stob_perf_domain_ops
 
static struct m0_stob_ops stob_perf_ops
 
static const struct m0_stob_io_op stob_perf_io_ops
 
static struct m0_stob_type_ops stob_perf_type_ops
 
const struct m0_stob_type m0_stob_perf_type
 

Macro Definition Documentation

◆ __LINUXSTOB

#define __LINUXSTOB   "linuxstob:"

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_STOB

Definition at line 23 of file perf.c.